Adjust to new version of NSIS UAC

This commit is contained in:
Daniel Molkentin 2015-05-28 15:54:52 +02:00
parent e1a36b53dc
commit 1d600ceecc

View file

@ -248,11 +248,7 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
############################################################################## ##############################################################################
Function LaunchApplication Function LaunchApplication
${UAC.CallFunctionAsUser} LaunchApplicationAsUser !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "" ""
FunctionEnd
Function LaunchApplicationAsUser
Exec "$INSTDIR\${APPLICATION_EXECUTABLE}"
FunctionEnd FunctionEnd
############################################################################## ##############################################################################
@ -367,7 +363,6 @@ Function PageLeaveReinstall
RMDir $INSTDIR RMDir $INSTDIR
no_remove_uninstaller: no_remove_uninstaller:
StrCmp $R0 "2" 0 +3 StrCmp $R0 "2" 0 +3
UAC::Unload
Quit Quit
BringToFront BringToFront
reinst_done: reinst_done:
@ -762,7 +757,7 @@ Function .onInit
${MementoSectionRestore} ${MementoSectionRestore}
UAC_Elevate: UAC_Elevate:
UAC::RunElevated !insertmacro UAC_RunElevated
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user? StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
StrCmp 0 $0 0 UAC_Err ; Error? StrCmp 0 $0 0 UAC_Err ; Error?
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper? StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
@ -810,11 +805,9 @@ Function .onInstSuccess
${AndIf} $InstallRunIfSilent == "yes" ${AndIf} $InstallRunIfSilent == "yes"
Call LaunchApplication Call LaunchApplication
${EndIf} ${EndIf}
UAC::Unload ;Must call unload!
FunctionEnd FunctionEnd
Function .onInstFailed Function .onInstFailed
UAC::Unload ;Must call unload!
FunctionEnd FunctionEnd
############################################################################## ##############################################################################
@ -827,7 +820,7 @@ Function un.onInit
Call un.SetLang Call un.SetLang
UAC_Elevate: UAC_Elevate:
UAC::RunElevated !insertmacro UAC_RunElevated
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user? StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
StrCmp 0 $0 0 UAC_Err ; Error? StrCmp 0 $0 0 UAC_Err ; Error?
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper? StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
@ -858,9 +851,7 @@ Function un.onInit
FunctionEnd FunctionEnd
Function un.onUnInstSuccess Function un.onUnInstSuccess
UAC::Unload ;Must call unload!
FunctionEnd FunctionEnd
Function un.onUnInstFailed Function un.onUnInstFailed
UAC::Unload ;Must call unload!
FunctionEnd FunctionEnd