Hi,
I am trying to use ShellExecute function to invoke the ax program.
The code below works perfect:
ShellExecute(0&, "open", "ax.exe", "C:\2runtemp2.run", "C:\axfolder", 5)
The code below does NOT work:
ShellExecute(0&, "open", "ax.exe", "C:\Documents and Settings\jon\Desktop\requiredfiles\2runtemp2.run", "C:\axfolder", 5)
Because of some design issues, the arguement "must" have spaces in its full path. Even though I write the path in double quotations, I can not prevent this error.
Any help on the error is much appreciated. Thanks,
jon
3 3837
Hi,
I am trying to use ShellExecute function to invoke the ax program.
The code below works perfect:
ShellExecute(0&, "open", "ax.exe", "C:\2runtemp2.run", "C:\axfolder", 5)
The code below does NOT work:
ShellExecute(0&, "open", "ax.exe", "C:\Documents and Settings\jon\Desktop\requiredfiles\2runtemp2.run", "C:\axfolder", 5)
Because of some design issues, the arguement "must" have spaces in its full path. Even though I write the path in double quotations, I can not prevent this error.
Any help on the error is much appreciated. Thanks,
jon
ShellExecute(0&, "open", "ax.exe", """C:\Documents and Settings\jon\Desktop\requiredfiles\2runtemp2.run"" ", "C:\axfolder", 5)
ShellExecute(0&, "open", "ax.exe", """C:\Documents and Settings\jon\Desktop\requiredfiles\2runtemp2.run"" ", "C:\axfolder", 5)
-
-
Dim strPath
-
Dim retval
-
strPath = "C:\Documents and Settings\jon\Desktop\requiredfiles\2runtemp2.run"
-
retval = ShellExecute(0&, "open", "ax.exe", Chr(34) & strPath & Chr(34), "C:\axfolder", 5)
-
may not need the chr(34)...not sure
The code below does NOT work:
ShellExecute(0&, "open", "ax.exe", "C:\Documents and Settings\jon\Desktop\requiredfiles\2runtemp2.run", "C:\axfolder", 5)
Not sure if this would work .... try using the "short" folder name, ie, "C:\Docume~1\" instead of "C:\Documents and Settings\" .... ???
James
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Josh Mayfield |
last post by:
Note: There is considerable background detail here, but I do have
three questions, which are clearly marked and appear right before the
sample code.
I have a legitimate need to launch an EXE...
|
by: the_openFace |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: the openBack |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: magix |
last post by:
Dear Guru,
From Dos Command, I can execute like C:\Converter TextFile.txt or
C:\Converter D:\TextFile.txt
I wrote an application (using VC++) to call a dos command, where
sztxtBuffer1 is the...
|
by: John Smith |
last post by:
Hello,
I'm not sure if these are the appropriate forums for my question since
it is closer to about Visual Studio 2005 than it is about .NET
framework. So please pardon me and direct me to a...
|
by: H. Martins |
last post by:
Hi.
I have the following code:
Option Compare Database
Public Declare Function ShellExecute Lib "Shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
|
by: =?Utf-8?B?aGtNaWNybw==?= |
last post by:
Having problems compiling the following code in C USING CL.EXE
// shell.c LANGUAGE = .NET 2003
#include <iostream.h>
#include <windows.h>
int main()
{
SHELLEXECUTE(NULL, "open",...
|
by: John Smith |
last post by:
Hi,
I have an access database form with an image. I'm trying to create an
onclick event on the image so that when a user clicks on the image it opens
that file with the default viewer the...
|
by: newbess |
last post by:
I am completely and totally new to VB so any dumbing down and/or condescension is welcome and expected.
I have been charged with the task of creating a prompt window within a folder on our network...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |