Hi,
When i use the "Run Program" command the app runs fine except that i need the startup dir to be set.
When i use the "Run Program As" setting the startup directory the app does not start.
I have checked the command has been added to the code in the correct place.
Any help here greatly appreciated
Cheers
Richard
Run Program As not working
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
For some applications (ex: .NET applications), setting this startup field does not seem to be sufficient, but an actual SetCurrentDirectoryA call is required to set the current directory on the system before calling Run Program or Run Program As. This is not a Run Program As bug, but apparently a limitation in either the API or the applications in question.
Just call SetCurrentDirectoryA Win32 API using Call DLL Function to work around this issue - this function is found in kernel32.dll, takes a single pointer to string parameter (the directory to switch to, such as $TARGETDIR$), and returns a bool.
Just call SetCurrentDirectoryA Win32 API using Call DLL Function to work around this issue - this function is found in kernel32.dll, takes a single pointer to string parameter (the directory to switch to, such as $TARGETDIR$), and returns a bool.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: Bing [Bot] and 162 guests