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
- :
- Setting environment variable using registry
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2010
10:22 AM
Setting environment variable using registry
I have an InstallScript function that sets an environment variable by creating a value in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. The variable shows up when I view the env var GUI under Control Panel, but if I type SET in the command window it isn't listed. If I try to echo it in the command window, it doesn't get any value.
How do I set the environment variable correctly from a script?
This isn't a specifically InstallShield related question, but I was wondering if other people had run into this issue when setting an environment variable through editing the registry.
How do I set the environment variable correctly from a script?
This isn't a specifically InstallShield related question, but I was wondering if other people had run into this issue when setting an environment variable through editing the registry.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2010
11:55 AM
After "adding a value" (need both Name and Data) you need to reboot. Then it will be there.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2010
12:35 PM
okay. I've been researching still and I found you can use SendMessage() to update all applications of the change in the registry, so you don't have to restart 🙂