Explorar o código

UI: Fix win uninstall not deleting desktop shortcut

The Windows uninstaller was not deleting the desktop shortcut because
the shell context was incorrectly set to "current" for it, causing it to
try to delete in the incorrect location.
jp9000 %!s(int64=4) %!d(string=hai) anos
pai
achega
f7dcb6afd6
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      UI/installer/mp-installer.nsi

+ 2 - 0
UI/installer/mp-installer.nsi

@@ -453,12 +453,14 @@ Section "un.obs-studio Program Files" UninstallSection1
 	Delete "$INSTDIR\uninstall.exe"
 	Delete "$INSTDIR\uninstall.exe"
 
 
 	; Delete Shortcuts
 	; Delete Shortcuts
+	SetShellVarContext all
 	Delete "$DESKTOP\OBS Studio.lnk"
 	Delete "$DESKTOP\OBS Studio.lnk"
 	Delete "$SMPROGRAMS\OBS Studio\OBS Studio (32bit).lnk"
 	Delete "$SMPROGRAMS\OBS Studio\OBS Studio (32bit).lnk"
 	Delete "$SMPROGRAMS\OBS Studio\Uninstall.lnk"
 	Delete "$SMPROGRAMS\OBS Studio\Uninstall.lnk"
 	${if} ${RunningX64}
 	${if} ${RunningX64}
 		Delete "$SMPROGRAMS\OBS Studio\OBS Studio (64bit).lnk"
 		Delete "$SMPROGRAMS\OBS Studio\OBS Studio (64bit).lnk"
 	${endif}
 	${endif}
+	SetShellVarContext current
 
 
 	IfFileExists "$INSTDIR\data\obs-plugins\win-ivcam\seg_service.exe" UnregisterSegService SkipUnreg
 	IfFileExists "$INSTDIR\data\obs-plugins\win-ivcam\seg_service.exe" UnregisterSegService SkipUnreg
 	UnregisterSegService:
 	UnregisterSegService: