MSI file install which requires reboot

Apr 14, 2010 at 1:57 PM
Edited Apr 14, 2010 at 2:06 PM

I have a WiX project which constructs the MSI file which is used by dotNetInstaller. In this WiX file I have the following defined:

 

<InstallExecuteSequence>
      ....
      <ScheduleReboot After='CA.DeleteTempFolder'>(NOT Installed)</ScheduleReboot>
</InstallExecuteSequence>

The MSI component install then result in the install to ask the user if he or she wants to reboot. This works, but dNI reports that the installation of the MSI has failed. I've tried to set the returncodes_success parameter to "1641,3010". Also tried to set the returncodes_reboot to the same without getting dNI to accept that the MSI install was successful. Also tried to set different combinations of mustreboot, reboot_required and must_reboot_required, but still no luck.

Here's the last entries in the log file regarding this:

2010-04-14 14:40:38	--- Component 'Installer.msi' (Installer.msi): EXECUTING
2010-04-14 14:40:38	Extracting embedded files for component 'Installer.msi': NO FILES EMBEDDED
2010-04-14 14:40:38	Destination 'C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\Installer.msi', exists=False, copy=False
2010-04-14 14:40:38	Destination 'C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\Installer.msi', exists=False, download=True
2010-04-14 14:40:38	Opening download dialog 'MyApp Installer'
2010-04-14 14:40:38	Destination 'C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\Installer.msi', exists=False, copy=False
2010-04-14 14:40:38	Destination 'C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\Installer.msi', exists=False, download=True
2010-04-14 14:40:38	Downloading 'MyApp Installer', source='http://web.company.intern/installer2/Installer.msi', 
destination='C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\',
full='C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\Installer.msi', always download=True
2010-04-14 14:40:39	Download 'MyApp Installer', size=3.6MB: OK
2010-04-14 14:40:39	--- Download OK
2010-04-14 14:40:39	Closing download dialog 'MyApp Installer'
2010-04-14 14:40:39	-- Package: C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\Installer.msi
2010-04-14 14:40:39	Executing: msiexec /i "C:\DOCUME~1\TRONDA~1\LOCALS~1\Temp\MyApp\Installer.msi"
2010-04-14 14:41:11	--- Component 'Installer.msi (Installer.msi): DIALOG CLOSED
2010-04-14 14:41:11	*** Component 'Installer.msi' (Installer.msi): ERROR - Error executing 'Installer.msi' (Installer.msi): 0x669
2010-04-14 14:41:11	--- Component 'Installer.msi (Installer.msi)' FAILED: Error executing 'Installer.msi' (Installer.msi): 0x669

I also tried to add the HEX representation of 1641 - which is 0x669, but without any luck.

Apr 14, 2010 at 2:04 PM

An option for me is to remove the ScheduleReboot from the MSI file, if I can get dNI to reboot after a successful install of all products. Not sure how I would do that. I've tried some of the reboot options associated with the MSI component, but not been able to get the result I want. Any pointers?

Coordinator
Apr 14, 2010 at 11:51 PM
Edited Apr 15, 2010 at 12:00 AM

What's happening is that your MSI is initiating a reboot (ERROR_SUCCESS_REBOOT_INITIATED = 1641). dotNetInstaller doesn't support that return code for a good reason - it is hanging in the middle of a rebooting box and who knows what happens now :)

To clarify, the component of type 'msi' doesn't handle it as a reboot, but instead handles it as a failure. This is by design. You could of course use the command component and invoke msiexec and force it to do anything with the exitcode options. That wouldn't be a good idea, especially because a reboot within an installer doesn't cleanly signal dotNetInstaller to exit, which doesn't leave it an opportunity to write anything to registry to resume after the reboot.

You should suppress the reboot by specifying the correct parameter on the command line (REBOOT=Suppress or REBOOT=ReallySuppress). See values for the REBOOT property. Specify REBOOT=Suppress in the additional MSI options. This will transform the 1641 error code into ERROR_SUCCESS_REBOOT_REQUIRED = 3010.

 

Apr 15, 2010 at 7:47 AM

Thank you for your feedback and patience with a newbie :-)

You should suppress the reboot by specifying the correct parameter on the command line (REBOOT=Suppress or REBOOT=ReallySuppress). See values for the REBOOT property. Specify REBOOT=Suppress in the additional MSI options. This will transform the 1641 error code into ERROR_SUCCESS_REBOOT_REQUIRED = 3010.

Could you post an example on how the XML would look like for this?

Regards,
Trond Andersen  

Coordinator
Apr 15, 2010 at 4:52 PM
    <component package="#CABPATH\Simple\Simple.msi" cmdparameters="REBOOT=Suppress" cmdparameters_silent="/qn REBOOT=Suppress" cmdparameters_basic="/qb- REBOOT=Suppress" uninstall_package="" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" id="simple" display_name="Simple.msi" uninstall_display_name="" os_filter_greater="" os_filter_smaller="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" required="True" selected="True" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True">
      <installedcheck path="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{89DD6045-A45B-4ED4-9C06-E93316D52A1D}" fieldname="Version" fieldvalue="1" defaultvalue="False" fieldtype="REG_DWORD" comparison="exists" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check" />
    </component>

Use the editor. Hand-editing XML creates unused nodes, bad schema, etc. :)