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
- :
- Exit code processing with InstallScript for SQL 2008R2 Express
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
‎May 26, 2010
02:07 PM
Exit code processing with InstallScript for SQL 2008R2 Express
Hi all,
Am writing a installer installing the MS SQL 2008 R2 Express Edition. Now as Microsoft recommends (comp. http://msdn.microsoft.com/en-us/library/dd981032%28SQL.100%29.aspx) I want to check the exit codes given by the SQL installer. To do so I started writing a InstallScript CA:
How must I modify the code to process the exit codes
0 = Successful installation.
0xBC2 = Successful installation; however, a system reboot is required.
0x84c408 = .NET is required.
84c40010 = Microsoft Windows Installer 4.5 is required.
Or any other ideas for good error code handling here ?
Thanks and best regards
Tobias
Am writing a installer installing the MS SQL 2008 R2 Express Edition. Now as Microsoft recommends (comp. http://msdn.microsoft.com/en-us/library/dd981032%28SQL.100%29.aspx) I want to check the exit codes given by the SQL installer. To do so I started writing a InstallScript CA:
nResult = LaunchAppAndWait(RootDir ^ "SQLEXPR_x64_ENU.exe" , "/IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /INSTANCENAME=MYINSTANCE /SECURITYMODE=SQL /SAPWD=MYPASSWORD", LAAW_OPTION_WAIT);
nExitCode = LAAW_PARAMETERS.nLaunchResult;
SprintfBox (INFORMATION, "System Information", "%ld", nExitCode);
How must I modify the code to process the exit codes
0 = Successful installation.
0xBC2 = Successful installation; however, a system reboot is required.
0x84c408 = .NET is required.
84c40010 = Microsoft Windows Installer 4.5 is required.
Or any other ideas for good error code handling here ?
Thanks and best regards
Tobias
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 21, 2010
03:02 AM
Any ideas ? Thanks
Tobias
Tobias
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 22, 2010
06:19 AM
Ok just figured it out. Works with the following code (Problem was hex representation in errorcode):
//Install SQL Server Express 2008R2 Instance
nResult = LaunchAppAndWait(RootDir ^ "SQLEXPR_x64_ENU.exe" , "/IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /INSTANCENAME=MYINSTANCE /SECURITYMODE=SQL /SAPWD=MYPASSWORD", LAAW_OPTION_WAIT);
// retrieve exit code as string, as it is in hex Sprintf is used to get string
nExitCode = LAAW_PARAMETERS.nLaunchResult;
Sprintf (szExitCode, "0x%lx", nExitCode);
if (szExitCode=="0x0") then
szExitCode="0";
endif;
SprintfMsiLog("Microsoft SQL Server 2008 R2 Express Edition installation closed with exit code: " + szExitCode);
// Installation ok if exit code is 0 or 0xBC2
// comp. http://msdn.microsoft.com/en-us/library/dd981032%28SQL.100%29.aspx
if (szExitCode != "0") then
if (szExitCode != "0xBC2") then
MessageBox("Installation SQL server not sucessful!",INFORMATION);
return -1;
endif;
endif;
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)