From 78ff782b89196d4cb3a5a549513ef1de5d096a93 Mon Sep 17 00:00:00 2001 From: shuax Date: Wed, 30 Mar 2022 13:04:57 +0800 Subject: Make environment variables take effect immediately after installation is complete --- scripts/installer.nsi | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.3.1