mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-18 20:50:09 +08:00
remember install path in installer
This commit is contained in:
parent
9ce48ba242
commit
5fa22bdb87
@ -22,6 +22,12 @@ RequestExecutionLevel user
|
||||
UninstallText "This will uninstall Throne. Do you wish to continue?"
|
||||
UninstallIcon "res\ThroneDel.ico"
|
||||
|
||||
Function .onInit
|
||||
ReadRegStr $R0 HKCU "Software\Throne" "InstallPath"
|
||||
StrCmp $R0 "" +2
|
||||
StrCpy $INSTDIR $R0
|
||||
FunctionEnd
|
||||
|
||||
!macro AbortOnRunningApp EXEName
|
||||
killModule:
|
||||
FindProcDLL::FindProc ${EXEName}
|
||||
@ -43,6 +49,8 @@ Section "Install"
|
||||
|
||||
CreateShortcut "$desktop\Throne.lnk" "$instdir\Throne.exe"
|
||||
CreateShortcut "$SMPROGRAMS\Throne.lnk" "$INSTDIR\Throne.exe" "" "$INSTDIR\Throne.exe" 0
|
||||
|
||||
WriteRegStr HKCU "Software\Throne" "InstallPath" "$INSTDIR"
|
||||
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Throne" "DisplayName" "Throne"
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Throne" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||
@ -65,4 +73,4 @@ Section "Uninstall"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
|
||||
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Throne"
|
||||
SectionEnd
|
||||
SectionEnd
|
||||
Loading…
Reference in New Issue
Block a user