custom dialog for reboot
I wanted to create a custom dialog that gives the user the option to reboot upon completion of the installation of the package. I was thinking the right way to do this was to create the custom dialog, place it into the correct area of the UI sequence, then create a condition and CA that reboots based on either the yes or no buttons. Of course I would have to create a property for the reboot, correct? (I guess based on the yes button, which would cause the reboot)? If anyone could provide me with some guidence with this process I would appreciate it very much. Thanks.
-Dan
-Dan
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
spartacus
18 years ago
First set your REBOOTPROMPT property to "Suppress" so that any reboot related messages your users will see are your own customised ones and not the Windows Installer default one.
Your dialog should set the value of a property based on whether the user selected Yes or No to the reboot.
The custom action should then read this property and if a Yes was selected, should execute the line :
session.mode(6) = TRUE 'set the msiRunModeRebootAtEnd flag to True
whereas if a No was selected it should execute the line :
session.mode(6) = FALSE 'set the msiRunModeRebootAtEnd flag to False
Alternatively, instead of using a dialog, you could use the following (admittedly very basic) Custom Action script
[font="Courier New"]Dim iUserResponse
iUserResponse = msgbox("This installation will require a reboot at the end, OK to perform one ?",4,"Reboot Request")
if iUserResponse = 6 then
session.mode(6) = TRUE
else
session.mode(6) = FALSE
end if
Hope this helps out
Regards,
Spartacus
Your dialog should set the value of a property based on whether the user selected Yes or No to the reboot.
The custom action should then read this property and if a Yes was selected, should execute the line :
session.mode(6) = TRUE 'set the msiRunModeRebootAtEnd flag to True
whereas if a No was selected it should execute the line :
session.mode(6) = FALSE 'set the msiRunModeRebootAtEnd flag to False
Alternatively, instead of using a dialog, you could use the following (admittedly very basic) Custom Action script
[font="Courier New"]Dim iUserResponse
iUserResponse = msgbox("This installation will require a reboot at the end, OK to perform one ?",4,"Reboot Request")
if iUserResponse = 6 then
session.mode(6) = TRUE
else
session.mode(6) = FALSE
end if
Hope this helps out
Regards,
Spartacus
Posted by:
danr29
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.