Skip to content

Commit f92a3cd

Browse files
committed
[*] fix /install Notify the system to refresh environment variables after installing oadin
1 parent 56bb662 commit f92a3cd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

installer/win/oadin-ci.nsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ Section "Install"
190190
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "DisplayName" "${APP_NAME}"
191191
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "UninstallString" "$INSTDIR\uninstall.exe"
192192
Call AddPathSystem
193+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\oadin.exe" "" "$INSTDIR\oadin.exe"
194+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\oadin.exe" "Path" "$INSTDIR"
193195
;${Else}
194196
; WriteRegStr HKCU "SOFTWARE\${COMPANY_NAME}\${APP_NAME}" "InstallDir" "$INSTDIR"
195197
; WriteRegStr HKCU "SOFTWARE\${COMPANY_NAME}\${APP_NAME}" "Version" "${VERSION}"
@@ -387,6 +389,8 @@ Section "Uninstall"
387389
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
388390
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "Oadin"
389391
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" "Oadin"
392+
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\oadin.exe"
393+
390394
DeleteRegKey HKCU "SOFTWARE\${COMPANY_NAME}\${APP_NAME}"
391395
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
392396
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Oadin"
@@ -601,6 +605,8 @@ Function RemoveOldOadin
601605
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
602606
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "Oadin"
603607
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" "Oadin"
608+
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\oadin.exe"
609+
604610
${EndIf}
605611
ReadRegStr $R3 HKCU "SOFTWARE\${COMPANY_NAME}\${APP_NAME}" "InstallDir"
606612
${If} $R3 != ""

0 commit comments

Comments
 (0)