mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
Use current user in context and launch app after install [skip ci]
This commit is contained in:
@@ -119,11 +119,12 @@ Sleep 1000
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
Function .onInit
|
; The "" makes the section hidden.
|
||||||
|
Section "" SecUninstallPrevious
|
||||||
|
|
||||||
Exec $INSTDIR\netbird_uninstall.exe
|
Call UninstallPrevious
|
||||||
|
|
||||||
FunctionEnd
|
SectionEnd
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
Section Uninstall
|
Section Uninstall
|
||||||
@@ -146,4 +147,25 @@ Function LaunchLink
|
|||||||
SetShellVarContext current
|
SetShellVarContext current
|
||||||
ExecShell "" "$DESKTOP\${UI_APP_NAME}.lnk"
|
ExecShell "" "$DESKTOP\${UI_APP_NAME}.lnk"
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Function UninstallPrevious
|
||||||
|
|
||||||
|
; Check for uninstaller.
|
||||||
|
ReadRegStr $R0 HKLM "${HKLM_REG_KEY}" "InstallDir"
|
||||||
|
|
||||||
|
${If} $R0 == ""
|
||||||
|
Goto Done
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
DetailPrint "Removing previous installation."
|
||||||
|
|
||||||
|
; Run the uninstaller silently.
|
||||||
|
ExecWait '"$R0\netbird_uninstall.exe /S"'
|
||||||
|
|
||||||
|
Done:
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
Reference in New Issue
Block a user