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
- :
- Launch an Exe through installscripts
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 31, 2008
04:49 AM
Launch an Application
I am using Installshield professional 2008 .I want to install an exe which is will come in the custom option of the setup type.
I wrote the neccessary code in the Program_installed event
The PROGRAM is pointing to a exe on the local file system.
function Program_Installed()
NUMBER nWait;
begin
//if (LaunchAppAndWait (PROGRAM, "", nWait) < 0) then
if (LaunchApp (PROGRAM,"") < 0) then
MessageBox ("Unable to launch "+ PROGRAM +".",SEVERE);
endif;
end;
But it always gives me an error. says cannot launch exe.Please help asap
I wrote the neccessary code in the Program_installed event
The PROGRAM is pointing to a exe on the local file system.
function Program_Installed()
NUMBER nWait;
begin
//if (LaunchAppAndWait (PROGRAM, "", nWait) < 0) then
if (LaunchApp (PROGRAM,"") < 0) then
MessageBox ("Unable to launch "+ PROGRAM +".",SEVERE);
endif;
end;
But it always gives me an error. says cannot launch exe.Please help asap
(2) Replies
‎Feb 01, 2008
05:19 AM
Hi,
First of all check that the file exists. Even if your 100% sure it does, it's always a good check to make!
FormatMessage() will turn the return value into a string telling you what a function returned. I personally don't use it as I use the debugger, but it might help you!
Where abouts are you calling this bit of code? Are you certain it's called AFTER the file has been installed?
Let us know what the two calls return!
First of all check that the file exists. Even if your 100% sure it does, it's always a good check to make!
nReturn = Is( FILE_EXISTS, sYourProgram );
MessageBox( "File Exist returns: " + FormatMessage( nReturn ), WARNING );
if ( nReturn = 1 ) then
nReturn = LaunchAppAndWait( sYourProgram, "", LAAW_OPTION_WAIT );
MessageBox( "LaunchAppAndWait returns: " + FormatMessage( nReturn ), WARNING );
endif;
FormatMessage() will turn the return value into a string telling you what a function returned. I personally don't use it as I use the debugger, but it might help you!
Where abouts are you calling this bit of code? Are you certain it's called AFTER the file has been installed?
Let us know what the two calls return!
‎Feb 01, 2008
07:19 AM
Hi William,
thanks for your help it worked
The first called returned "Invalid Function" and the second one returned
"The operation completed successfully".
I am trying to install files lke creating a directory structure then installing a third party exe file so am calling this under onFirstAfterUI() event so at the end of the progress screen this shall call the third party exe and install it...
Have a great week end
thanks,
Hemant.
thanks for your help it worked
The first called returned "Invalid Function" and the second one returned
"The operation completed successfully".
I am trying to install files lke creating a directory structure then installing a third party exe file so am calling this under onFirstAfterUI() event so at the end of the progress screen this shall call the third party exe and install it...
Have a great week end
thanks,
Hemant.
William-Webb wrote:
Hi,
First of all check that the file exists. Even if your 100% sure it does, it's always a good check to make!
nReturn = Is( FILE_EXISTS, sYourProgram );
MessageBox( "File Exist returns: " + FormatMessage( nReturn ), WARNING );
if ( nReturn = 1 ) then
nReturn = LaunchAppAndWait( sYourProgram, "", LAAW_OPTION_WAIT );
MessageBox( "LaunchAppAndWait returns: " + FormatMessage( nReturn ), WARNING );
endif;
FormatMessage() will turn the return value into a string telling you what a function returned. I personally don't use it as I use the debugger, but it might help you!
Where abouts are you calling this bit of code? Are you certain it's called AFTER the file has been installed?
Let us know what the two calls return!