Silent reboot with multiple user logged in.

Dec 14, 2010 at 10:09 AM

Hello all.

Here's my goal: I need to do a remote silent install (without any user confirmation) while a user can be logged on the target machine.

The component installation is successful but, before the reboot is started, a windows prompt appear (blocking my installation) that tells me there are ohter users working on this machine.

Is there a way to execute a silent reboot without that windows prompt (forced for all users)?

The only way I've found is to use a "Command component" with this command

cmd.exe /k "shutdown /r /f"
but seems that using this command cannot complete the installation. (my log stops at executing that line)

 

P.S: I cannot rely on continue the installation after the reboot because on the target machine there may be the auto-logon on a specified user.

Thx.

Coordinator
Dec 14, 2010 at 11:38 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Dec 14, 2010 at 11:40 AM

You can force reboot in the component with the must_reboot option. Unfortunately the code is calling the Win32 API with a EWX_REBOOT flag, which causes these dialogs. For silent install it should just do EWX_REBOOT | EWX_FORCE and we should maybe add an option for users to override this behavior. I created a feature request. The first part of this change is relatively trivial, patches welcome.

Dec 14, 2010 at 3:23 PM

Can I still use the method described above or there are major problems due to this?

If I use the command component as the last component to be executed, should be no problem if all other packages are installed. Temp files are deleted too.

Coordinator
Dec 14, 2010 at 5:30 PM

If it's a component, then DNI thinks that the component failed (it causes a reboot and never returns). You could use it as a complete_command maybe, but I still think it's flaky. I would make a small effort and fix the code.

Dec 15, 2010 at 8:50 AM

Tried complete_command but seems not working at all..