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
- :
- Try these things:
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Apr 09, 2010
11:01 AM
LaunchAppAndWait not executing?
I have an InstallScript Custom Action in a Basic MSI project that calls the LaunchAppAndWait function to execute 7zip to extract a file. The zipped file is already on the target machine. The install runs successfully, but it doesn't extract the zipped file.
Here is the message when I output the szApp and szCmd parameters from LaunchAppAndWait during the install:
C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" "-oC:\Program Files\OC4J"
I also print out the error code using LAAW_PARAMETERS.nLaunchResult. It returns 0, which is no error for 7zip, however the command doesn't seem to have done anything.
I have the message dialog popping up immediately after calling LaunchAppAndWait, so it stops the installation until I hit the OK button. When the dialog is up, I execute the exact same command from the DOS prompt, and it works fine. I don't understand why it isn't working in InstallShield. Can anybody shed some light on what is going wrong?
Here is the message when I output the szApp and szCmd parameters from LaunchAppAndWait during the install:
C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" "-oC:\Program Files\OC4J"
I also print out the error code using LAAW_PARAMETERS.nLaunchResult. It returns 0, which is no error for 7zip, however the command doesn't seem to have done anything.
I have the message dialog popping up immediately after calling LaunchAppAndWait, so it stops the installation until I hit the OK button. When the dialog is up, I execute the exact same command from the DOS prompt, and it works fine. I don't understand why it isn't working in InstallShield. Can anybody shed some light on what is going wrong?
(7) Replies
‎Apr 09, 2010
04:58 PM
I don't know anything about that executable, but does it work if you launch 7zip.exe with no arguments (show a splash screen or error message, for example)? And then start adding command-line switches one at a time, if possible?
‎Apr 12, 2010
09:00 AM
7zip is an extraction and zipping tool. If I launched 7zip by itself nothing would happen, it needs arguments so it knows what to extract. As I've already stated, I get the error code back from launching 7zip to see if the execute call was successful. It returns 0, which means no error. I launch the exact same command from the command-line and it executes fine. But for some reason it isn't doing the extracting when InstallShield performs it. I'm not sure what the problem with InstallShield is.
‎Apr 12, 2010
10:27 AM
Have you tried to use "LongPathToQuote" ?
regards
Markus
regards
Markus
‎Apr 12, 2010
11:13 AM
Yes, I have been using LongPathToQuote. I discovered the 7zip command fails without quotes because of the space between Program Files.
"C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" "-oC:\Program Files\OC4J"
In the command I have each argument surrounded with quotes. During installation I have a dialog pop up showing the command about to be executed. I open up the DOS command line, type in the exact same command, and it executes properly. But for some reason InstallShield fails to do this, even though the error code returned indicates a successful call.
I have the Custom Action executing after Write Environment Strings, so I believe there shouldn't be any problems there. And the files and locations I'm using in the command are already on the system anyway. I don't understand what's wrong.
"C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" "-oC:\Program Files\OC4J"
In the command I have each argument surrounded with quotes. During installation I have a dialog pop up showing the command about to be executed. I open up the DOS command line, type in the exact same command, and it executes properly. But for some reason InstallShield fails to do this, even though the error code returned indicates a successful call.
I have the Custom Action executing after Write Environment Strings, so I believe there shouldn't be any problems there. And the files and locations I'm using in the command are already on the system anyway. I don't understand what's wrong.
‎Apr 12, 2010
11:46 AM
1. Remove the LAAW_OPTION_HIDDEN option so that you can see the
window.
2. Specify the full path. On my machine 7z is not in the path.
3. Are you sure it is 7a.exe? Mine is 7z.exe.
4. Try executing the command from a command prompt.
5. As Robert suggested... you should be able to do 7z.exe with no arguments and see a help screen. Try that from the command line and see.
Good Luck!
window.
2. Specify the full path. On my machine 7z is not in the path.
3. Are you sure it is 7a.exe? Mine is 7z.exe.
4. Try executing the command from a command prompt.
5. As Robert suggested... you should be able to do 7z.exe with no arguments and see a help screen. Try that from the command line and see.
Good Luck!
‎Apr 15, 2010
01:31 AM
Looking at the command line "C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" "-oC:\Program Files\OC4J" I notice that the -o is also inside the quotes.
Shouldn't you have to specify the following: "C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" -o"C:\Program Files\OC4J"
That is, -o"C:... instead of "-oC:... ?
Shouldn't you have to specify the following: "C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" -o"C:\Program Files\OC4J"
That is, -o"C:... instead of "-oC:... ?
‎Apr 16, 2010
09:22 AM
I eventually got this to work, although I'm not sure what was going wrong in the first place.
Yes, the -o can be placed inside the quotes, or outside. I was having problems with it at first when it was outside the quotes, but now that everything is worked, I moved the -o outside and it works fine too.
Yes, the -o can be placed inside the quotes, or outside. I was having problems with it at first when it was outside the quotes, but now that everything is worked, I moved the -o outside and it works fine too.