Client Management Suite

 View Only

How to Force a Reboot Using WiseScript 

Jul 21, 2008 02:03 PM

Want to use WiseScript to force a reboot, but do not know how? These steps can help you do just that. This tip will tell you the commands to use in order to reboot with WiseScript.

To create a Force Reboot:

  1. Go to the Build Settings page under Build Options.
  2. Check the check box named No Reboot Message During Silent Installs. If you run the install in silent mode, the system will reboot for you.

Another way of forcing a reboot without running your main install in silent mode is to execute a second executable in silent mode. You will need to create a second executable with Wise. Create a script containing one line of code using the Set Variable action in the Script Editor.

In the Set Variable dialog, enter RESTART in the Variable field. Enter S in the New Value field and click OK. Go to the Build Settings page in Installation Expert and check the check box No Reboot Message During Silent Installs. Then from your main script, use the Execute Program action to call this .exe file and pass it a command line parameter of /s for silent. This will run the second install in silent mode and force a reboot for the end-user.

Prompt for Reboot:

Wise Installation System controls Restarts via the RESTART variable. When the installation exits, it checks the value of this variable and will prompt for a reboot if the flag is set. If it is not set, then there is no restart prompt.

The different values are:

  • W: This will restart Windows and not the entire system. For NT, this will log the current user out, and allow another user to log in.
  • S: This will reboot the entire system, and not just Windows.
  • E (DOS command ): This will execute a program in DOS on a reboot, after rebooting the entire system.

In some cases, the Wise Installation System sets this variable internally. You can check its values, or even overwrite it with another value at any time in the script. Of course, the best place is the last line, so it does not get reset.

If you want to suppress any possible reboots, set the variable RESTART to a blank space or no value at all.

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.