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
- :
- exe cannot run using LaunchAppAndWait command
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 21, 2011
01:45 AM
exe cannot run using LaunchAppAndWait command
Hi all,
I use installshield 2009 to build my installer.
I have put "FwUpgrade.exe" & "update.xml" under installshield's support files.
This exe is kind of window form application installer.
This exe not require any clicking actions.
I need to call and run "FwUpgrade.exe -f update.xml" for my case.
However, I always get result "-1" which the exe cannot run at all.
Could anyone please advice me on my mistake?
Thanks.
Here are my codes example:
prototype FwUpgrade();
function FwUpgrade()
string szKey, szNumName, szApp, szMsg, szNumValue;
string svValue;
number nType, nSize, nReturn, nError;
begin
//Upgrade Firmware
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\P&C";
nType = REGDB_STRING;
szNumName = "MainVersion";
szNumValue = CurrentVersion;
nSize = -1;
nReturn = RegDBGetKeyValueEx(szKey,szNumName,nType,svValue,nSize);
if (StrCompare(CurrentVersion,svValue)>0) then
szApp = SUPPORTDIR ^ "FwUpgrade.exe";
if(LaunchAppAndWait(szApp,"", LAAW_OPTION_WAIT)<0)then
MessageBox("Launch app failed", SEVERE);
end if;
end if;
end;
Methods I have tried:
(1)szApp = SUPPORTDIR ^ "FwUpgrade.exe";
LaunchAppAndWait(szApp ,"", LAAW_OPTION_WAIT)
(2)szApp = SUPPORTDIR ^ "FwUpgrade.exe";
LaunchAppAndWait(szApp, "-f update.xml" , LAAW_OPTION_WAIT)
(3)szApp = SUPPORTDIR ^ "FwUpgrade.exe";
szCmd = szApp+" /f update.xml";
LaunchAppAndWait("CMD.exe", szCmd , LAAW_OPTION_WAIT)
I use installshield 2009 to build my installer.
I have put "FwUpgrade.exe" & "update.xml" under installshield's support files.
This exe is kind of window form application installer.
This exe not require any clicking actions.
I need to call and run "FwUpgrade.exe -f update.xml" for my case.
However, I always get result "-1" which the exe cannot run at all.
Could anyone please advice me on my mistake?
Thanks.
Here are my codes example:
prototype FwUpgrade();
function FwUpgrade()
string szKey, szNumName, szApp, szMsg, szNumValue;
string svValue;
number nType, nSize, nReturn, nError;
begin
//Upgrade Firmware
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\P&C";
nType = REGDB_STRING;
szNumName = "MainVersion";
szNumValue = CurrentVersion;
nSize = -1;
nReturn = RegDBGetKeyValueEx(szKey,szNumName,nType,svValue,nSize);
if (StrCompare(CurrentVersion,svValue)>0) then
szApp = SUPPORTDIR ^ "FwUpgrade.exe";
if(LaunchAppAndWait(szApp,"", LAAW_OPTION_WAIT)<0)then
MessageBox("Launch app failed", SEVERE);
end if;
end if;
end;
Methods I have tried:
(1)szApp = SUPPORTDIR ^ "FwUpgrade.exe";
LaunchAppAndWait(szApp ,"", LAAW_OPTION_WAIT)
(2)szApp = SUPPORTDIR ^ "FwUpgrade.exe";
LaunchAppAndWait(szApp, "-f update.xml" , LAAW_OPTION_WAIT)
(3)szApp = SUPPORTDIR ^ "FwUpgrade.exe";
szCmd = szApp+" /f update.xml";
LaunchAppAndWait("CMD.exe", szCmd , LAAW_OPTION_WAIT)
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 21, 2011
08:38 AM
This might sound silly but did you verify the path is exactly what you think it is?
szTestValue = SUPPORTDIR ^ "FwUpgrade.exe";
MessageBox(szTestValue, WARNING);
looking at the way you are calling it I do not see anything particularly wrong with what you are doing. Also what happens if you manually execute this file from the command line? Does it work?
szTestValue = SUPPORTDIR ^ "FwUpgrade.exe";
MessageBox(szTestValue, WARNING);
looking at the way you are calling it I do not see anything particularly wrong with what you are doing. Also what happens if you manually execute this file from the command line? Does it work?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 07, 2011
02:44 AM
Thank you alot overlordchin!!
I solved my problem!
What a silly mistake i have made.
SUPPORTDIR does not work for Basic MSI project.
Therefore, after i change the directory,it works.
🙂
I solved my problem!
What a silly mistake i have made.
SUPPORTDIR does not work for Basic MSI project.
Therefore, after i change the directory,it works.
🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 09, 2011
01:36 AM
Use MsiGetProperty function to retrieve SUPPORTDIR property value in installscript.