made the Reboot command first quit and then reboot

- fixed bug #989690
 - the installer now denies reboots while running
 - the Reboot instruction no longer returns or sets the error flag
 - added .onRebootFailed which is called when Reboot fails
 - installer should now always clean-up when rebooting


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3729 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-10-14 13:56:02 +00:00
parent b5cab9b25f
commit 335fd47066
10 changed files with 100 additions and 58 deletions

View file

@ -5078,12 +5078,18 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
#endif//!NSIS_SUPPORT_FILEFUNCTIONS
#ifdef NSIS_SUPPORT_REBOOT
case TOK_REBOOT:
ent.which=EW_REBOOT;
ent.offsets[0]=0xbadf00d;
{
int ret = add_entry_direct(EW_REBOOT, 0xbadf00d);
if (ret != PS_OK) return ret;
ret = add_entry_direct(EW_QUIT);
if (ret != PS_OK) return ret;
SCRIPT_MSG("Reboot! (WOW)\n");
DefineInnerLangString(NLF_INST_CORRUPTED);
return add_entry(&ent);
}
return PS_OK;
case TOK_IFREBOOTFLAG:
ent.which=EW_IFFLAG;
if (process_jump(line,1,&ent.offsets[0]) ||