This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- 2008 Migration Issue....
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 19, 2007
09:04 AM
2008 Migration Issue....
Ive just migrated a basic msi installer from Installshield 11 to 2008, very few migration issues 🙂
However, within the migrated Installer I am attempting to launch another process using a wrapped up version LaunchAppAndWait. On all target operating systems with the exception of Vista this works fine. When using Vista the install fails to launch the process and the returns a code: 740(ERROR_ELEVATION_REQUIRED).
The workaround for this problem is to use the new LaunchApplication API with the LAAW_OPTION_USE_SHELLEXECUTE flag. This makes it use ShellExecute (which can show UAC prompts) instead of CreateProcess (which won't).
However, I need the exit code to check for reboots also - LaunchApplication does not offer this.
Any solutions to this problem??
However, within the migrated Installer I am attempting to launch another process using a wrapped up version LaunchAppAndWait. On all target operating systems with the exception of Vista this works fine. When using Vista the install fails to launch the process and the returns a code: 740(ERROR_ELEVATION_REQUIRED).
The workaround for this problem is to use the new LaunchApplication API with the LAAW_OPTION_USE_SHELLEXECUTE flag. This makes it use ShellExecute (which can show UAC prompts) instead of CreateProcess (which won't).
However, I need the exit code to check for reboots also - LaunchApplication does not offer this.
Any solutions to this problem??
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 19, 2007
10:39 AM
If you are waiting for the process to exit, you can use the LAAW_PARAMETERS.nLaunchResult variable:
LAAW_PARAMETERS - http://helpnet.macrovision.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield14langref/LAAW_PARAMETERS.htm
LAAW_PARAMETERS - http://helpnet.macrovision.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield14langref/LAAW_PARAMETERS.htm
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 20, 2007
05:47 AM
The help doesnt seem to mention LAAW_PARAMETERS.nLaunchResult for the function LaunchApplication.
Also LAAW_PARAMETERS.nLaunchResult returns whether or not the function was successful, not an exit code e.g. 3010 for a reboot.
Are there any example snippets for using the above function to retrieve the exit code?
Also should the function WaitForApplication be used instead of WaitForSingleObject???
The Installshield help is ntovery helpful.
Also LAAW_PARAMETERS.nLaunchResult returns whether or not the function was successful, not an exit code e.g. 3010 for a reboot.
Are there any example snippets for using the above function to retrieve the exit code?
Also should the function WaitForApplication be used instead of WaitForSingleObject???
The Installshield help is ntovery helpful.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 20, 2007
10:23 AM
LAAW_PARAMETERS.nLaunchResult applies to LaunchAppAndWait and LaunchApplication. If you pass the LAAW_OPTION_WAIT flag in the nOptions parameter to LaunchApplication, LaunchApplication will automatically wait for the created process to exit. Once the wait has completed, LaunchApplication sets LAAW_PARAMETERS.nLaunchResult to the process exit code by calling the GetExitCodeProcess Win32 API.
I you are trying to manually wait for the launched process, WaitForApplication should be used instead of WaitForSingleObject. You will need to manually retrieve the exit code in this case.
I you are trying to manually wait for the launched process, WaitForApplication should be used instead of WaitForSingleObject. You will need to manually retrieve the exit code in this case.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2007
04:30 AM
Thanks for the reply
The help didnt seem to mention LaunchApplication.
So if I pass the LAAW_OPTION_WAIT flag LaunchApplication will automatically wait for the created process to exit and give me an exit code e.g. 310 for reboot?
And once the wait has completed, LaunchApplication calls the GetExitCodeProcess Win32 API?
And what do you mean manually wait and manually retrieve the exit code ?
All I want to do is launch the application in shell mode (to display UAC prompts) and handle the exit code for reboots.
The help didnt seem to mention LaunchApplication.
So if I pass the LAAW_OPTION_WAIT flag LaunchApplication will automatically wait for the created process to exit and give me an exit code e.g. 310 for reboot?
And once the wait has completed, LaunchApplication calls the GetExitCodeProcess Win32 API?
And what do you mean manually wait and manually retrieve the exit code ?
All I want to do is launch the application in shell mode (to display UAC prompts) and handle the exit code for reboots.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 26, 2007
09:25 AM
Passing the LAAW_OPTION_WAIT flag to LaunchApplication or LaunchAppAndWait will automatically wait for the launched process to exit before continuing. Once the launched process has exited, the LAAW_PARAMETERS.nLaunchResult variable is set to indicate the exit code from the launched process.
Using LaunchApplication with the LAAW_OPTION_USE_SHELLEXECUTE flag and the LAAW_OPTION_WAIT flag should cause a UAC prompt to appear for the executable to be launched, and will then wait for it to exit if it successfully launched. Upon exit, LAAW_PARAMETERS.nLaunchResult should contain the exit code from the launched process.
Using LaunchApplication with the LAAW_OPTION_USE_SHELLEXECUTE flag and the LAAW_OPTION_WAIT flag should cause a UAC prompt to appear for the executable to be launched, and will then wait for it to exit if it successfully launched. Upon exit, LAAW_PARAMETERS.nLaunchResult should contain the exit code from the launched process.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)