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() doesn't Work With Window 7.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 09, 2011
11:37 PM
LaunchAppAndWait() doesn't Work With Window 7.
Hi,
I have migrated project to IS 2011.
We are using LaunchAppAndWait (szCmdLine, "", bWait) function to launch EXE.
Here szCmdLine is "C:\Documents and Settings\Rahul\Desktop\redist\dotnetfx2.0.exe"/q:a /c:"install.exe/qb"
Does any body know why this function is not working with Window 7?
It works with Window XP.
I have migrated project to IS 2011.
We are using LaunchAppAndWait (szCmdLine, "", bWait) function to launch EXE.
Here szCmdLine is "C:\Documents and Settings\Rahul\Desktop\redist\dotnetfx2.0.exe"/q:a /c:"install.exe/qb"
Does any body know why this function is not working with Window 7?
It works with Window XP.
(9) Replies
‎Jan 10, 2011
12:19 AM
Are you trying to place this code in a custom action?
if yes, then try to set the in-script execution to deferred in system context.
this should elevate the process on Win 7.
if yes, then try to set the in-script execution to deferred in system context.
this should elevate the process on Win 7.
‎Jan 10, 2011
03:26 AM
Thanks for the reply,
I have written this function in Setup.rul script file which IS calls.
This is not the custom action.
Do you have any info about LAAW_OPTION_USE_SHELLEXECUTE parameter?
I think by using that Parameter Install shield script engin will call ShellExecuteEx funciton. And that will support window 7.
Rahul
I have written this function in Setup.rul script file which IS calls.
This is not the custom action.
Do you have any info about LAAW_OPTION_USE_SHELLEXECUTE parameter?
I think by using that Parameter Install shield script engin will call ShellExecuteEx funciton. And that will support window 7.
Rahul
‎Jan 10, 2011
04:40 AM
Yeah, in this case you can use LAAW_OPTION_USE_SHELLEXECUTE
in LaunchApplication instead and have the LAAW_SHELLEXECUTEVERB = "runas".
This should elevate your process on Win 7.
in LaunchApplication instead and have the LAAW_SHELLEXECUTEVERB = "runas".
This should elevate your process on Win 7.
‎Jan 10, 2011
10:28 PM
Hi Thanks again,
I was trying below function but it is not working as expected,
LaunchApplication(szCmdLine,"","",1000, LAAW_OPTION_WAIT | LAAW_OPTION_USE_SHELLEXECUTE)
Do you have any working code for this function LaunchApplication()?
I was trying below function but it is not working as expected,
LaunchApplication(szCmdLine,"","",1000, LAAW_OPTION_WAIT | LAAW_OPTION_USE_SHELLEXECUTE)
Do you have any working code for this function LaunchApplication()?
‎Jan 11, 2011
03:09 AM
I have sent you a generic code which I use.
hope that helps you.
hope that helps you.
‎Jan 11, 2011
07:31 AM
Hello Roman,
below is the piece of code i use to elevate an install on Vista/Win 7 etc
*************************************
function OnBegin()
STRING szProgram,szCmdLine,szDirectory;
NUMBER nShowWindow,nTimeOut,nOptions;
begin
szProgram = SUPPORTDIR ^ "setup.exe";
szCmdLine = "" ;
szDirectory = "";
nShowWindow = SW_NORMAL;
nTimeOut = 10000;
nOptions = LAAW_OPTION_USE_SHELLEXECUTE ;
//This ensures that the application is always run with full administrator privileges
LAAW_SHELLEXECUTEVERB = "runas";
//A message box just for internal testing
MessageBox("Click ok to Launch",INFORMATION);
// launch application--setup.exe in this case
LaunchApplication(szProgram,szCmdLine,szDirectory,nShowWindow,nTimeOut,nOptions );
end;
*****************************
hey Rahul, I have modified the code a bit.......
below is the piece of code i use to elevate an install on Vista/Win 7 etc
*************************************
function OnBegin()
STRING szProgram,szCmdLine,szDirectory;
NUMBER nShowWindow,nTimeOut,nOptions;
begin
szProgram = SUPPORTDIR ^ "setup.exe";
szCmdLine = "" ;
szDirectory = "";
nShowWindow = SW_NORMAL;
nTimeOut = 10000;
nOptions = LAAW_OPTION_USE_SHELLEXECUTE ;
//This ensures that the application is always run with full administrator privileges
LAAW_SHELLEXECUTEVERB = "runas";
//A message box just for internal testing
MessageBox("Click ok to Launch",INFORMATION);
// launch application--setup.exe in this case
LaunchApplication(szProgram,szCmdLine,szDirectory,nShowWindow,nTimeOut,nOptions );
end;
*****************************
hey Rahul, I have modified the code a bit.......
‎Jan 11, 2011
08:53 AM
Hey Roman,
If you want OnBegin() to wait then you may need to consider using the
nOptions = LAAW_OPTION_WAIT|LAAW_OPTION_USE_SHELLEXECUTE ;
in the sample script.
this would wait for the external application to complete/abort.
If you want OnBegin() to wait then you may need to consider using the
nOptions = LAAW_OPTION_WAIT|LAAW_OPTION_USE_SHELLEXECUTE ;
in the sample script.
this would wait for the external application to complete/abort.