wix and reboot prompt

2,405 views
Skip to first unread message

zejo...@gmail.com

unread,
Jun 27, 2013, 7:06:33 AM6/27/13
to dotneti...@googlegroups.com
Hello,

I have a problem with dot net installer embedding a msi installer build using wix : the reboot prompt is done, but DNI seems to ignore the answer, and process the reboot, whether the user choose to reboot or not.

Configuration for DNI looks like this :

<configuration dialog_caption="Setup" dialog_message="Setup consists of the following components:" dialog_message_uninstall="" dialog_bitmap="" skip_caption="Skip" install_caption="Install" uninstall_caption="Uninstall" cancel_caption="Close" status_installed=" (Installed)" status_notinstalled="" failed_exec_command_continue="Failed to install %s. Continue with other components?" installation_completed="Installed successfully!" uninstallation_completed="Uninstalled successfully!" installation_none="Already installed!" uninstallation_none="Not installed!" installing_component_wait="Installing %s. Wait, this operation could take some time ..." uninstalling_component_wait="Uninstalling %s. Wait, this operation could take some time ..." reboot_required="To continue the installation you must restart your computer. Restart now?" must_reboot_required="False" dialog_otherinfo_caption="" dialog_otherinfo_link="" complete_command="" complete_command_silent="" complete_command_basic="" wait_for_complete_command="True" prompt_for_optional_components="False" auto_close_if_installed="True" auto_close_on_error="False" reload_on_error="True" dialog_show_installed="True" dialog_show_uninstalled="True" dialog_show_required="True" cab_dialog_message="%s" cab_cancelled_message="" cab_dialog_caption="" cab_path="#TEMPPATH\#GUID" cab_path_autodelete="True" dialog_default_button="cancel" dialog_position="" dialog_components_list_position="" dialog_message_position="" dialog_bitmap_position="" dialog_otherinfo_link_position="" dialog_osinfo_position="" dialog_install_button_position="" dialog_cancel_button_position="" dialog_skip_button_position="" auto_start="False" auto_continue_on_reboot="False" reboot_cmd="" show_progress_dialog="True" show_cab_dialog="True" disable_wow64_fs_redirection="False" administrator_required="False" administrator_required_message="Installation requires administration rights." type="install" lcid_filter="!1036" language_id="1033" language="English" os_filter="" os_filter_min="winXPsp3" os_filter_max="" processor_architecture_filter="" supports_install="True" supports_uninstall="True">

    <embedfolder sourcefolderpath="#APPPATH\embed" targetfolderpath="" />

    <component package="#CABPATH\any.msi" cmdparameters="" cmdparameters_silent="" cmdparameters_basic="" uninstall_package="" uninstall_cmdparameters="" uninstall_cmdparameters_silent="" uninstall_cmdparameters_basic="" disable_wow64_fs_redirection="False" id="any.msi" display_name="any.msi" uninstall_display_name="" os_filter="" os_filter_min="" os_filter_max="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" default_continue_on_error="False" required_install="True" required_uninstall="True" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True" show_progress_dialog="True" show_cab_dialog="True" />

</configuration>

In wix config, I simply added <ScheduleReboot After="InstallFinalize"><![CDATA[REMOVE <> "ALL"]]></ScheduleReboot> at the end of my <InstallExecuteSequence> directive.

Last lines of my log file (after NO answer to prompt for reboot):

2013-06-27 12:56:57 Executing: msiexec /i "<...>\any.msi"
2013-06-27 12:58:21 *** Component 'any.msi' (any.msi): SUCCESS
2013-06-27 12:58:21 --- Component 'any.msi (any.msi): REQUESTS REBOOT
2013-06-27 12:58:21 --- Component 'any.msi (any.msi: CAUSED A REBOOT
2013-06-27 12:58:21 Writing RunOnReboot registry key, /noRunOnReboot was not specified.
2013-06-27 12:58:21 Writing HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\any.exe: "<...>\any.exe" /log /Reboot
2013-06-27 12:58:21 Exiting with 3010 and rebooting Windows.
2013-06-27 12:58:21 Deleting CAB folder: <...>
2013-06-27 12:58:21 dotNetInstaller finished, return code: 3010 (0xbc2)


NB. : after reading http://dotnetinstaller.codeplex.com/discussions/209312, I understand we should not rely on the msi reboot prompt. Does that mean we could configure DNI to force generated exe to prompt for reboot and handle user response ? How to do this ?

Wix version : 3.7
DNI : 2.2

Thanks for your help !

Z.J.

Daniel Doubrovkine

unread,
Jun 27, 2013, 9:21:49 AM6/27/13
to dotneti...@googlegroups.com
The short answer is that yes, you shouldn't use the MSI's reboot prompt with a bootstrapper. That's because it would effectively abort the bootstrapper and won't give it a chance to resume on reboot if necessary. There's a whole section on handling reboots in the documentation, and the default behavior is to prompt you. Set the value of reboot_required option to the text you want displayed that prompts the user to reboot.

--
You received this message because you are subscribed to the Google Groups "dotnetinstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotnetinstall...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

dB. | Moscow - Geneva - Seattle - New York
code.dblock.org - @dblockdotorg - artsy.net - github/dblock

zejo...@gmail.com

unread,
Jun 27, 2013, 1:53:01 PM6/27/13
to dotneti...@googlegroups.com
Thanks for your reply ;

I just realize that there is an attribute "ui_level" in configurations tag, which was set to none, that's why I do not see the prompt.

Setting this attribute to "basic" (and setting "show_progress_dialog" and "show_cab_dialog" attributes to false), and use of param REBOOT=ReallySuppress in my msi cmd params partially solves my problem.

Now, after DNI prompt for reboot, in basic mode (/qb), prompt just left me few seconds for clicking "Yes" or "No". After these seconds (if I do not click "No" before prompt disappears), it reboots automatically. In full UI mode (/nq), it doesn't (it leaves me the time to make choice). 

In case of canceling an installation step, the message "Failed to install Continue with other components?" is also closed before I click "yes" or "no". In that case, my log looks like :

*** Component 'any.msi' (any.msi): ERROR - Error executing 'any.msi' (any.msi): 1602 (0x642)
--- Component 'any.msi (any.msi)' FAILED: Error executing 'any.msi' (any.msi): 1602 (0x642)
--- Component 'any.msi (any.msi): FAILED, CONTINUE
Silent install, closing. (NB. : This line is absent of log in case of successful install)
Deleting CAB folder: C:\...
dotNetInstaller finished, return code: 1602 (0x642)

An additional question : is there any way to make /NoRunOnReboot true by default in DNI conf (see log "Writing RunOnReboot registry key, /noRunOnReboot was not specified.") ?

NB. : Same problem occurs on XP and 7.

Regards,

Z.J.

PS. : my conf file : 
<?xml version="1.0" encoding="utf-8"?>
<configurations lcid_type="User" show_language_selector="True" language_selector_title="Select Setup Language" language_selector_ok="OK" language_selector_cancel="Cancel" configuration_no_match_message="" ui_level="basic" fileversion="4.2.0.0" productversion="4.2.0.0" log_enabled="False" log_file="">
  <schema version="2.2.824.0" generator="dotNetInstaller InstallerEditor" />
  <fileattributes>
    <fileattribute name="FileDescription" value="Foo" />
    <fileattribute name="ProductName" value="Bar Setup" />
    <fileattribute name="CompanyName" value="Foo" />
    <fileattribute name="LegalCopyright" value="Bar" />
    <fileattribute name="LegalTrademarks" value="" />
  </fileattributes>
  <configuration dialog_caption="Setup" dialog_message="Setup consists of the following components:" dialog_message_uninstall="" dialog_bitmap="" skip_caption="Skip" install_caption="Install" uninstall_caption="Uninstall" cancel_caption="Close" status_installed=" (Installed)" status_notinstalled="" failed_exec_command_continue="Failed to install %s. Continue with other components?" installation_completed="installed successfully!" uninstallation_completed="uninstalled successfully!" installation_none="is already installed!" uninstallation_none="is not installed!" installing_component_wait="Installing %s. Wait, this operation could take some time ..." uninstalling_component_wait="Uninstalling %s. Wait, this operation could take some time ..." reboot_required="To continue the installation you must restart your computer. Restart now?" must_reboot_required="False" dialog_otherinfo_caption="" dialog_otherinfo_link="" complete_command="" complete_command_silent="" complete_command_basic="" wait_for_complete_command="True" prompt_for_optional_components="True" auto_close_if_installed="False" auto_close_on_error="False" reload_on_error="True" dialog_show_installed="False" dialog_show_uninstalled="False" dialog_show_required="False" cab_dialog_message="%s" cab_cancelled_message="" cab_dialog_caption="" cab_path="#TEMPPATH\#GUID" cab_path_autodelete="True" dialog_default_button="cancel" dialog_position="" dialog_components_list_position="" dialog_message_position="" dialog_bitmap_position="" dialog_otherinfo_link_position="" dialog_osinfo_position="" dialog_install_button_position="" dialog_cancel_button_position="" dialog_skip_button_position="" auto_start="False" auto_continue_on_reboot="False" reboot_cmd="" show_progress_dialog="True" show_cab_dialog="True" disable_wow64_fs_redirection="False" administrator_required="False" administrator_required_message="installation requires administration rights." type="install" lcid_filter="!1036" language_id="1033" language="English" os_filter="" os_filter_min="winXPsp3" os_filter_max="" processor_architecture_filter="" supports_install="True" supports_uninstall="True">
    <embedfolder sourcefolderpath="#APPPATH\embed" targetfolderpath="" />
    <component package="#CABPATH\-installer.msi" cmdparameters="REBOOT=ReallySuppress" cmdparameters_silent="REBOOT=ReallySuppress" cmdparameters_basic="REBOOT=ReallySuppress" uninstall_package="" uninstall_cmdparameters="" uninstall_cmdparameters_silent="" uninstall_cmdparameters_basic="" disable_wow64_fs_redirection="False" id="-installer.msi" display_name="-installer.msi" uninstall_display_name="" os_filter="" os_filter_min="" os_filter_max="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="TEST" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" default_continue_on_error="True" required_install="False" required_uninstall="True" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True" show_progress_dialog="False" show_cab_dialog="False" />
  </configuration>
</configurations>

Daniel Doubrovkine

unread,
Jun 27, 2013, 7:33:50 PM6/27/13
to dotneti...@googlegroups.com
The behavior is correct, the different UI modes are there for automation, not for hiding/showing dialogs. There's a basic UI mode that chooses defaults for you and shows what it's doing, and a silent mode that doesn't display anything at all. It's consistent with MSI UI modes.

There's no way to prevent DNI to write the registry reboot key explicitly, and that's by design. It's only useful for testing, but in production you should never need to do that - if you need to ignore a component that tells you "reboot me now", then do that with the other available options (treat 3010 return code as non-reboot for example).  


--
You received this message because you are subscribed to the Google Groups "dotnetinstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotnetinstall...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel Doubrovkine

unread,
Jun 27, 2013, 7:34:57 PM6/27/13
to dotneti...@googlegroups.com
I realize my answers may have been a bit "well, tough luck" :) 

I guess the real question from here is what would you like the bootstrapper to do?

zejo...@gmail.com

unread,
Jun 28, 2013, 4:21:26 AM6/28/13
to dotneti...@googlegroups.com
Indeed, I'm a bit new to these technos, and I may be wrong, by design...

My need is : 
- I have a MSI for my app, build with wix ;
- My app requires VCRedist to be install, prior my app ;
- After installing my app, I need a reboot (the famous reboot prompt), but I don't want my MSI to be launch again after reboot (what the "/NoRunOnReboot" flag corrects) ;

=> I would like the bootstrapper to install VCRedist silently and then delegate install to my MSI.

I realize the solution may be to use "complete_command" tag to launch my MSI "outside" the bootstrapper, after installation of VCRedist. Am I right ?

Thanks for your help !

ZJ.

Daniel Doubrovkine

unread,
Jun 28, 2013, 7:51:09 AM6/28/13
to dotneti...@googlegroups.com
Reboot prompts are there for a reason - if VCRedist requires a reboot, it means it wasn't able to place a DLL in the right place, so you should not be running your application - it's likely not to work (even if often it does). Let the reboot happen and then install your MSI after the reboot normally. Don't use complete_command for your MSI.

zejo...@gmail.com

unread,
Jul 1, 2013, 3:37:49 AM7/1/13
to dotneti...@googlegroups.com
OK for VCredist ;

For my MSI, neither the bootstraper nor the installer has any more operation to do after the reboot. That's why I would like the MSI to install my program, and then prompt for the reboot, process if user agree, wait for manual reboot otherwise.

Regards, 

ZJ.

Daniel Doubrovkine

unread,
Jul 1, 2013, 7:42:50 AM7/1/13
to dotneti...@googlegroups.com
That's currently not supported the way you want it. The bootstrapper could probably be smarter about knowing that all components have installed when causing a reboot and not writing the key. It shouldn't be too complex of a change, I'd welcome a pull request with code that does that.

Adhar Jain

unread,
Aug 28, 2016, 11:33:45 AM8/28/16
to dotnetinstaller
Hi Daniel,

Where can i find reboot documentation?

Thanks
Adhar

Daniel Doubrovkine

unread,
Aug 29, 2016, 12:41:18 PM8/29/16
to dotneti...@googlegroups.com
There's a section in the CHM on reboots.

To unsubscribe from this group and stop receiving emails from it, send an email to dotnetinstaller+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages