Hi
When performing silent installation using SMS, how could I tell whether my setup is installed successful or not ? The return code from setup.exe is always return 0 even the installation is failed like no enough space, etc.
Thanks
Joe
Silent Install ReturnCode
Hello Joe,
I previously had the same problem.
When you use a silend setup, no dialogs or even error messages are shown.
If you only want to know if a setup has run correctly you can use a logged setup. Simply add the following line to the commandline:
I was not happy with a setup wich would not give you any information of the progress of even pre conditions etc.
So I created my own variable to check if the setup must be attended or unattended.
All the way on the top of my script I added the following code:
Now you can use the SILENTMODE variable to manually decide what you want to do, and of cource, every messagebox (like errors) will now be shown!
I even edited the progress dialog, wich will be shown in an unattended setup, but does not have any controls on it, so you can see the setup is running.
The only thing you must not forget is to add code like this in the dialogs loop.:
hope this helps.
Ton Blokhuizen
BMA BV- Netherlands[/code]
I previously had the same problem.
When you use a silend setup, no dialogs or even error messages are shown.
If you only want to know if a setup has run correctly you can use a logged setup. Simply add the following line to the commandline:
Code: Select all
..\\YourSetup.exe /l=c:\\logfilename.ext
I was not happy with a setup wich would not give you any information of the progress of even pre conditions etc.
So I created my own variable to check if the setup must be attended or unattended.
All the way on the top of my script I added the following code:
Code: Select all
Set variable SILENTMODE to $SILENT$
If SILENTMODE equals TRUE
Set variable SILENT to FALSE
End
Now you can use the SILENTMODE variable to manually decide what you want to do, and of cource, every messagebox (like errors) will now be shown!
I even edited the progress dialog, wich will be shown in an unattended setup, but does not have any controls on it, so you can see the setup is running.
The only thing you must not forget is to add code like this in the dialogs loop.:
Code: Select all
if Variable SILENTMODE not Equals TRUE
wizard loop
Display Dialog: welcome
[compiler if Variable BUILDMODE not Equals PATCH]
Display Dialog: licensecheck
Display Dialog: readme
Display Dialog: registration
Display Dialog: destination
Display Dialog: startmenu
[compiler end]
Display Dialog: startinstallation
end
GoTo Label: Main Install
[ etc ]
Display Dialog: progress
hope this helps.
Ton Blokhuizen
BMA BV- Netherlands[/code]
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Very easily done. Use the Terminate with Exit Code command. There you can specify any custom non-zero return code for a variety of error conditions in your setup script. For instance, 1 if prereq installs failed, 2 if setup itself failed, 3 if incorrect command line parameters specified, and so on...
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
When the installation involves the main setup logic, I know I have the full control by terminate with exit code command and I am doing it currently.
However, in our customer site, the installation run into "Setup resource decompression failure" error and the setup.exe still report success (ie, return 0) using SMS. That is why this question arise, and this is out of my control. Any thought on the solution ?
However, in our customer site, the installation run into "Setup resource decompression failure" error and the setup.exe still report success (ie, return 0) using SMS. That is why this question arise, and this is out of my control. Any thought on the solution ?
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Thanks for that report. I'll escalate this to product management so they can make sure a correct error code is returned upon initialization errors.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 165 guests