diff options
| author | shuax <[email protected]> | 2022-03-30 13:04:57 +0800 |
|---|---|---|
| committer | shuax <[email protected]> | 2022-03-30 13:04:57 +0800 |
| commit | 78ff782b89196d4cb3a5a549513ef1de5d096a93 (patch) | |
| tree | 008bbbbd03447db76e570e68965819622f9390cc /scripts | |
| parent | 24e7cbc6a3432ae12395e5dc73bb48b84bacaa12 (diff) | |
Make environment variables take effect immediately after installation is complete
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/installer.nsi | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 8ef9e2e6d..998dde356 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -300,6 +300,9 @@ Section "Add to PATH" InstallPath ; Write the installation path into the $PATH environment variable WriteRegExpandStr ${HKCU} "Environment" "Path" "$R1;$InstDir" ${EndIf} + + ; make sure windows knows about the change + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 SectionEnd |
