I have a script that writes a registry key. At the end of the install, I want to force a reboot.
I tried this but it didn't reboot:
Apply Install (get result into variable SUCCESS)
Set Variable REBOOTCOMPUTER to TRUE
How do I force a reboot?
How to force computer to reboot
-
CandiceJones
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
Studying the code at the end of the install:
Comment: End of Installation
Hide Dialog
Display Dialog: finish, wait for dialog to return (modal)
if Variable SILENT Equals FALSE
if Variable REBOOTCOMPUTER Equals TRUE
if Variable SUCCESS Equals REBOOT
Reboot Computer
end
end
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Run Program $TARGETDIR$\\mta.exe
Comment: TO-DO: Insert command that starts your application here
end
end
end
end
<<Code>>
We find the solution to be setting SUCCESS to TRUE as well.
Comment: End of Installation
Hide Dialog
Display Dialog: finish, wait for dialog to return (modal)
if Variable SILENT Equals FALSE
if Variable REBOOTCOMPUTER Equals TRUE
if Variable SUCCESS Equals REBOOT
Reboot Computer
end
end
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Run Program $TARGETDIR$\\mta.exe
Comment: TO-DO: Insert command that starts your application here
end
end
end
end
<<Code>>
We find the solution to be setting SUCCESS to TRUE as well.
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Candice, you said:
We find the solution to be setting SUCCESS to TRUE as well.
Did you mean: We find the solution to be setting SUCCESS to REBOOT as well.
If yes, does this look OK:
We find the solution to be setting SUCCESS to TRUE as well.
Did you mean: We find the solution to be setting SUCCESS to REBOOT as well.
If yes, does this look OK:
Code: Select all
if Variable ADVERTISE Equals TRUE
Apply Advertised (get result into variable SUCCESS)
else
Apply Install (get result into variable SUCCESS)
Comment: Force a reboot after installing key!
Set Variable REBOOTCOMPUTER to TRUE
Set Variable SUCCESS to REBOOT
end
-
CandiceJones
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:

