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
- :
- Re: launchappandwait not working on vista
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
‎Jan 08, 2010
12:46 PM
launchappandwait not working on vista
I have an IS2010 Installscript MSI project. I upgraded it from 2009 where it worked - on XP. i am now trying to run the install on Vista. I call LaunchAppAndWait on a file that is in the SUPPORT dir. The nLaunchResult code returned in LAAW_PARAMETERS is 2, which I think means File Not found. I am calling FindFile before calling LaunchAppAndWait and InstallShield finds the file. I did a test and used a program path to the same file that I had put in a folder on my computer. LaunchAppandWait worked with that path. Is there a problem using SUPPORTDIR on Vista?
Thank you.
Thank you.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2010
01:57 PM
Are you using SUPPORTDIR or MsiGetProperty(..., "SUPPORTDIR", ...)? It might be worth showing a message box with the command you are trying to launch, and seeing if it would work by hand while that message box is still up.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2010
02:48 PM
I am using SUPPORTDIR. I did display a message box with the program to be run - went to the temp folder created for the support files and double-clicked the file and it did start to execute.
Here is my code:
if(FindFile(SUPPORTDIR, "filetorun.exe", svResult = 0) then
szProgram = SUPPORTDIR ^ "filetorun.exe";
LongPathToQuote(szProgram, TRUE);
if(LaunchAppAndWait(szProgram, "", LAAW_OPTION_HIDDEN | WAIT) < 0) then
nError = LAAW_PARAMETERS.nLaunchResult;
endif;
else
MessageBox("Install file not found", SEVERE);
endif;
nError = 2 when I run this.
Here is my code:
if(FindFile(SUPPORTDIR, "filetorun.exe", svResult = 0) then
szProgram = SUPPORTDIR ^ "filetorun.exe";
LongPathToQuote(szProgram, TRUE);
if(LaunchAppAndWait(szProgram, "", LAAW_OPTION_HIDDEN | WAIT) < 0) then
nError = LAAW_PARAMETERS.nLaunchResult;
endif;
else
MessageBox("Install file not found", SEVERE);
endif;
nError = 2 when I run this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2010
03:15 PM
Might be permission related.
Try this, instead of creating an MSI in the releases, create a setup.exe instead. On the vista machine, right click the setup.exe and say 'Run as administrator'. If it works that time, it may be a matter of how your script/custom action is running.
Btw, setup.exe method works when runnnig the custom action as deferred execution. Not deferred system execution.
I'm still waiting for my thread to be answered, but i had a similar question myself. This is the only workaround i've found.
Try this, instead of creating an MSI in the releases, create a setup.exe instead. On the vista machine, right click the setup.exe and say 'Run as administrator'. If it works that time, it may be a matter of how your script/custom action is running.
Btw, setup.exe method works when runnnig the custom action as deferred execution. Not deferred system execution.
I'm still waiting for my thread to be answered, but i had a similar question myself. This is the only workaround i've found.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2010
03:32 PM
thanks for your suggestion. I'm not actually using CA's. I'm doing all this from InstallScript - a function in a dialog rul file. But, you could be right about it being some vista permission thing trying to run it from within InstallShield. My project does build a setup.exe and not an msi file.
Thanks.
Thanks.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2010
04:03 PM
Another note: I just tried copying the file from the SUPPORTDIR to a folder under TARGETDIR and using that path in the LaunchAppAndWait call and it worked!So, it seems to not like runnning the exe from the SUPPORTDIR - any idea why? I'll have to write script to remove the file if I copy it to the TARGETDIR when the install is complete. I like using SUPPORTDIR because it ensures all temporary files are removed. :confused:
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)