Reference/IfRebootFlag: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=IfRebootFlag= jump_if_set [jump_if_not_set] Checks the reboot flag, and jumps to jump_if_set if the reboot flag is set, otherwise jumps to jump_if_not_set. The reboot flag ca...")
 
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
  jump_if_set [jump_if_not_set]
  jump_if_set [jump_if_not_set]


Checks the reboot flag, and jumps to jump_if_set if the reboot flag is set, otherwise jumps to jump_if_not_set. The reboot flag can be set by [[Reference/Delete|Delete]] and [[Reference/Rename|Rename}]], or manually with [[Reference/SetRebootFlag|SetRebootFlag]].
Checks the reboot flag, and jumps to jump_if_set if the reboot flag is set, otherwise jumps to jump_if_not_set. The reboot flag can be set by [[Reference/Delete|Delete]] and [[Reference/Rename|Rename]], or manually with [[Reference/SetRebootFlag|SetRebootFlag]].


<highlight-nsis>IfRebootFlag 0 noreboot
<highlight-nsis>IfRebootFlag 0 noreboot
  MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" IDNO noreboot
MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" IDNO noreboot
    Reboot
Reboot
noreboot:</highlight-nsis>
noreboot:</highlight-nsis>
''Command introduced with NSIS v1.70''

Latest revision as of 20:42, 6 June 2013

IfRebootFlag

jump_if_set [jump_if_not_set]

Checks the reboot flag, and jumps to jump_if_set if the reboot flag is set, otherwise jumps to jump_if_not_set. The reboot flag can be set by Delete and Rename, or manually with SetRebootFlag.

IfRebootFlag 0 noreboot
MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" IDNO noreboot
Reboot
noreboot:

Command introduced with NSIS v1.70