From 755f2e7c39680cbb867ca95ef135c59079871dbb Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 7 Jun 2016 21:38:38 +0100 Subject: WinGui: For silent installs, assume it's All Users, not Current User. Admins deploying the app on the network were not seeing the app icons appearing when installing from a different user account from the users. --- win/CS/HandBrakeWPF/Installer/Installer.nsi | 9 +++++++++ win/CS/HandBrakeWPF/Installer/Installer64.nsi | 9 +++++++++ win/CS/HandBrakeWPF/Installer/MakeNightly.nsi | 9 +++++++++ win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi | 11 +++++++++-- 4 files changed, 36 insertions(+), 2 deletions(-) (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/Installer/Installer.nsi b/win/CS/HandBrakeWPF/Installer/Installer.nsi index 7bcc6b741..312dc2259 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer.nsi @@ -66,6 +66,10 @@ Var InstallDotNET Function .onInit + ; For Silent Installs, Assume All Users + IfSilent 0 +2 + SetShellVarContext all + ; Begin Only allow one version System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' Pop $R0 @@ -170,6 +174,11 @@ Function un.onUninstSuccess FunctionEnd Function un.onInit + + ; For Silent Installs, Assume All Users + IfSilent 0 +2 + SetShellVarContext all + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2 Abort FunctionEnd diff --git a/win/CS/HandBrakeWPF/Installer/Installer64.nsi b/win/CS/HandBrakeWPF/Installer/Installer64.nsi index 42957f8be..a1a736801 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer64.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer64.nsi @@ -66,6 +66,10 @@ Var InstallDotNET Function .onInit + ; For Silent Installs, Assume All Users + IfSilent 0 +2 + SetShellVarContext all + ; Begin Only allow one version System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' Pop $R0 @@ -172,6 +176,11 @@ Function un.onUninstSuccess FunctionEnd Function un.onInit + + ; For Silent Installs, Assume All Users + IfSilent 0 +2 + SetShellVarContext all + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2 Abort FunctionEnd diff --git a/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi b/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi index 2052588e3..65ac5dc88 100644 --- a/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi +++ b/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi @@ -65,6 +65,10 @@ ShowUnInstDetails show Var InstallDotNET Function .onInit + + ; For Silent Installs, Assume All Users + IfSilent 0 +2 + SetShellVarContext all ; Begin Only allow one version System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' @@ -170,6 +174,11 @@ Function un.onUninstSuccess FunctionEnd Function un.onInit + + ; For Silent Installs, Assume All Users + IfSilent 0 +2 + SetShellVarContext all + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2 Abort FunctionEnd diff --git a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi index a57cd3fac..f15141bfa 100644 --- a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi +++ b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi @@ -66,6 +66,9 @@ Var InstallDotNET Function .onInit + IfSilent 0 +2 + SetShellVarContext all + ; Begin Only allow one version System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' Pop $R0 @@ -170,13 +173,16 @@ Function un.onUninstSuccess FunctionEnd Function un.onInit + IfSilent 0 +2 + SetShellVarContext all + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2 Abort FunctionEnd Section Uninstall Delete "$INSTDIR\uninst.exe" - + Delete "$INSTDIR\*.*" Delete "$INSTDIR\doc\*.*" Delete "$INSTDIR\fonts\*.*" @@ -186,11 +192,12 @@ Section Uninstall RMDIR "$INSTDIR\fonts\conf.d" RMDIR "$INSTDIR\fonts\conf.avail" RMDIR "$INSTDIR\fonts" + RMDir "$INSTDIR" + Delete "$SMPROGRAMS\HandBrake Nightly\Uninstall.lnk" Delete "$DESKTOP\HandBrake Nightly.lnk" Delete "$SMPROGRAMS\HandBrake Nightly\HandBrake.lnk" RMDir "$SMPROGRAMS\HandBrake Nightly" - RMDir "$INSTDIR" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" -- cgit v1.2.3