aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-02-02 10:56:42 -0700
committerMark Young <marky@lunarg.com>2016-02-02 11:00:36 -0700
commitbb3dfbe95e62865895cf84dc3f1de016787a9299 (patch)
tree8c59a330e8e33916cb55e5c159369bd331f24006
parentf3504aa320a69d8b22002333eb728d395b32b339 (diff)
downloadusermoji-bb3dfbe95e62865895cf84dc3f1de016787a9299.tar.xz
windowssdk: Handle silent installer/uninstaller message boxes appropriately.
If Silent Install or Uninstall is enabled, we want all the message boxes we have control over to automatically make a selection. In addition, return an error if we are supposed to reboot, and the silent install doesn't show the message for the user to choose.
-rw-r--r--windowsRuntimeInstaller/InstallerRT.nsi15
1 files changed, 10 insertions, 5 deletions
diff --git a/windowsRuntimeInstaller/InstallerRT.nsi b/windowsRuntimeInstaller/InstallerRT.nsi
index 4a94f087..edea8b6a 100644
--- a/windowsRuntimeInstaller/InstallerRT.nsi
+++ b/windowsRuntimeInstaller/InstallerRT.nsi
@@ -435,10 +435,15 @@ Section "uninstall"
Call un.DeleteDirIfEmpty
# If any of the remove commands failed, request a reboot
- IfSilent noreboot
- IfRebootFlag 0 noreboot
- MessageBox MB_YESNO "A reboot is required to finish the uninstall. Do you wish to reboot now?" IDNO noreboot
- Reboot
+ IfRebootFlag 0 noreboot
+ MessageBox MB_YESNO "A reboot is required to finish the uninstall. Do you wish to reboot now?" /SD IDNO IDNO returnerror
+ Reboot
+
+ returnerror:
+
+ # Set an error message to output because we should reboot but didn't (whether because silent uninstall or user choice)
+ SetErrorLevel 3 # ERROR_TOO_MANY_OPEN_FILES
+
noreboot:
${Endif}
@@ -480,7 +485,7 @@ FunctionEnd
Function UninstallIfError
${If} ${Errors}
# IHV's using this install may want no message box.
- MessageBox MB_OK|MB_ICONSTOP "${errorMessage1}${errorMessage2}"
+ MessageBox MB_OK|MB_ICONSTOP "${errorMessage1}${errorMessage2}" /SD IDOK
# Copy the uninstaller to a temp folder of our own creation so we can completely
# delete the old contents.