EN RU
Log in
Home
Download
Purchase
Documentation
Support
Contact us
 
Help  /  Examples & tips

How to manage Windows reboot

During installation, some files may be locked by system processes, and can be updated only after rebooting the computer. In this case, the setup prompts the user to reboot the computer at the end of the installation process. Generally, you don't need to reboot the computer in the installations made with the CreateInstall installer, but you can force reboot or reboot with confirmation by using the Exit/Reboot command. This command can be inserted into your setup script, where the restart of the user's computer is required.

On the other hand, you can cancel or activate the Windows reboot with a special variable, reboot. You can always check the value of this variable. If it is 1, the setup could not update some files and the installation will prompt the user to reboot the machine. Otherwise, the reboot is not required. You can change the value of this variable by using the Set variables or Source code commands with the function macrox_setint. For example, you can cancel the restart, if you know that the program will work with the current versions of files. If you need the program to be started after a reboot, then assign 'reboot' to 1 and add the Action After Reboot command.

Force reboot the user
Force reboot the user's computer

Note that by default , and when you use the Exit/Reboot command (+Reboot with Confirmation option), the user is asked to allow a restart of the computer. In this case, the user can refuse to restart Windows and do it later. If you assign the value to 1 or use the Exit/Reboot command (+Reboot option), there will be a forced reboot. In this case, it is better to warn the user of that action in a dialog box or informational message.

See also

  • Exit/Reboot
Eonza automation software - free, open source cross-platform program for easy creation and management of scripts.
  • Help
    • Introduction
    • Get to know CreateInstall
    • Compare installers
    • License Agreement
    • License Light
    • License Free
    • Program features
    • Command Reference
    • FAQ
    • Examples & tips
      • Customizing setup.exe
      • Example of use of the dialog function
      • Global and local variables
      • How to manage the reboot
      • How to use conditional statements
      • How to use the command Dialog - Settings
      • How to wait for an event
      • Relative paths in the projects
      • Tracking exit
      • Functions for variables
      • One project for many applications
      • Open shortcut folder
    • CreateInstall Assistant
    • Problem solving
    • Setup Extractor
Copyright © Novostrim, OOO, 2009-2026 All rights reserved.