Skip to content

Commit

Permalink
Update install.nsi
Browse files Browse the repository at this point in the history
also write autostart info in hkcu to ensure autostart
  • Loading branch information
fxliang authored Apr 23, 2024
1 parent 2941162 commit 1f596b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions output/install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ program_files:
${Endif}
; Write autorun key
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "WeaselServer" "$INSTDIR\WeaselServer.exe"
; Add autostart in HKCU
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "WeaselServer" "$INSTDIR\WeaselServer.exe"
; Start WeaselServer
Exec "$INSTDIR\WeaselServer.exe"

Expand Down Expand Up @@ -332,6 +334,8 @@ Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM SOFTWARE\Rime
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Weasel"
; Remove autostart in HKCU
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "WeaselServer"
; don't redirect on 64 bit system for auto run setting
${If} ${IsNativeARM64}
SetRegView 64
Expand Down

0 comments on commit 1f596b9

Please sign in to comment.