This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: i want to modify "Path" Enviornmant Variable through Msi installshield
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Feb 12, 2013
12:04 AM
i want to modify "Path" Enviornmant Variable through Msi installshield
i want to install apache tomcat on target machine and i need to modify Windows "Path" Environment variable , how can i do?
(6) Replies
‎Feb 12, 2013
09:49 AM
use SetEnvironmentVariableA for the current session and if you need to get it updated permanently then set it in registry (SYSTEM\\ControlSetControl\\Session Manager\\Environment) and broadcast the same using SendMessage function.
‎Feb 12, 2013
01:26 PM
You could also use the Environment Variables view, which uses MSI's Environment table and related actions, to append something to PATH. The view is under System Configuration, and the help topic "Environment Variables View" has details.
‎Mar 07, 2017
06:19 AM
Hi,
I am using pure installscript project and there is not option for Environmental variables view.
We are still doing it from installscript code, it works on Win 7 ,but it hangs on Windows 10 machine. It hangs at the point,after setting the environment variable related registry key and try broadcasting the change to all child processes.
I tried replacing with SendMessageTimeout, so as to overcome hang issue, but at end of install, I see registry key updated with new env variable, but all other child processes not reflecting the new env var until we do system restart
szEnv = "Environment";
pEnv = &szEnv;
//Takes more time on Windows 10
//SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
if(!SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, pEnv, SMTO_ABORTIFHUNG, SMTO_TIMEOUT, pResult))then
LogInformation("SendMessageTimeout failed in RefreshEnvironment, Error :" + Err.LastDllError());
endif;
Is there any other way to forcefully get all child processes to reflect new environmental variable without doing a system restart?
Thanks,
Priya
I am using pure installscript project and there is not option for Environmental variables view.
We are still doing it from installscript code, it works on Win 7 ,but it hangs on Windows 10 machine. It hangs at the point,after setting the environment variable related registry key and try broadcasting the change to all child processes.
I tried replacing with SendMessageTimeout, so as to overcome hang issue, but at end of install, I see registry key updated with new env variable, but all other child processes not reflecting the new env var until we do system restart
szEnv = "Environment";
pEnv = &szEnv;
//Takes more time on Windows 10
//SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
if(!SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, pEnv, SMTO_ABORTIFHUNG, SMTO_TIMEOUT, pResult))then
LogInformation("SendMessageTimeout failed in RefreshEnvironment, Error :" + Err.LastDllError());
endif;
Is there any other way to forcefully get all child processes to reflect new environmental variable without doing a system restart?
Thanks,
Priya
RobertDickau wrote:
You could also use the Environment Variables view, which uses MSI's Environment table and related actions, to append something to PATH. The view is under System Configuration, and the help topic "Environment Variables View" has details.
‎Mar 13, 2017
09:22 AM
You re replying to Robert Dickau, but he has not logged on here since December of 2013, about 4 years ago.
Also, just so you know, Flexera no longer provides support for Installshield 2012. or 2012 Spring. You must be on at least 2013 to get support.
InstallScript only projects are very outdated. Everyone should be compiling to an MKSI these days. The old Setup.exe and InstallScript only is only maintained for backward compatibility.
You might have better luck if you use something more modern on Windows 10. The InstallShield 2012 precedes Windows 10 by a few years. It does not surprise me if anyone has difficulties.
Try something modern.
Chad
Also, just so you know, Flexera no longer provides support for Installshield 2012. or 2012 Spring. You must be on at least 2013 to get support.
InstallScript only projects are very outdated. Everyone should be compiling to an MKSI these days. The old Setup.exe and InstallScript only is only maintained for backward compatibility.
You might have better luck if you use something more modern on Windows 10. The InstallShield 2012 precedes Windows 10 by a few years. It does not surprise me if anyone has difficulties.
Try something modern.
Chad
‎Mar 13, 2017
09:39 AM
Here's the list of supported products. Even Limited support has ended for 2012 and 2012 Spring. Not much time left for support of 2013, either.
https://www.flexerasoftware.com/producer/support/additional-support/end-of-life/installshield.html
Chad