Skip to content

Commit

Permalink
更新 openssl.nsi
Browse files Browse the repository at this point in the history
  • Loading branch information
Internet1235 authored Nov 8, 2024
1 parent 26bd4c9 commit 4b83bff
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions windows-installer/openssl.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

!include "MUI.nsh"
!include "winmessages.nsh"
!include "WordFunc.nsh"

!define PRODUCT_NAME "OpenSSL"
!define VERSION "${MAJOR}.${MINOR}.${PATCH}"
Expand Down Expand Up @@ -78,19 +79,19 @@ SectionEnd
!endif

!ifdef BUILD64
Function ReadPathFromRegistry
Section "ReadPathFromRegistry"
ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$R0;$INSTDIR\x86_64\bin"
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
FunctionEnd
SectionEnd
!endif

!ifdef BUILD32
Function ReadPathFromRegistry
Section "ReadPathFromRegistry"
ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$R0;$INSTDIR\x86\bin"
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
FunctionEnd
SectionEnd
!endif

# Always install the uninstaller and set a registry key
Expand Down

0 comments on commit 4b83bff

Please sign in to comment.