<p>I added a custom install action to my installer to add one of my installation directories to the System PATH environment variable. After I run the installer, the PATH variable reflects the changes (when I access it through the Control Panel::System applet), but when I start a new command shell, the PATH variable does not reflect the changes. Is there something I'm failing to do, that causes this?</p>

[{'answer_id': 40323, 'author': 'Daren Thomas', 'author_id': 2260, 'author_profile': 'https://Stackoverflow.com/users/2260', 'pm_score': 2, 'selected': False, 'text': '<p>How are you starting the command shell? With the TaskManager?</p>\n\n<p>I suspect you might be starting it from Explorer - if I remember correctly, this could meen that you are inheriting the parent processes (Windows Explorer in this case) PATH variable. Since that was set before your installer ran, you see the old value.</p>\n\n<p>Not sure if this helps...</p>\n'}, {'answer_id': 40327, 'author': 'matt b', 'author_id': 4249, 'author_profile': 'https://Stackoverflow.com/users/4249', 'pm_score': 4, 'selected': True, 'text': '<p>I think this depends on how you are starting the new Command shell. For example, when you change the PATH environment variable under System properties, the change isn\'t reflected until you open a new Command prompt. I think when you launch a new "cmd" process (from the Run dialog for example), you get a fresh copy of all environment variables, but if you launch the command prompt a different way then you do not.</p>\n\n<p>For something done thru a script like that, you may need to restart before you notice the change.</p>\n'}, {'answer_id': 40328, 'author': 'Celestial M Weasel', 'author_id': 4125, 'author_profile': 'https://Stackoverflow.com/users/4125', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://support.microsoft.com/kb/310519" rel="nofollow noreferrer">http://support.microsoft.com/kb/310519</a> says that for system environment variables (which PATH is one of) requires a restart, although I have a feeling that logging off and on may be enough. </p>\n'}, {'answer_id': 40332, 'author': 'spoulson', 'author_id': 3347, 'author_profile': 'https://Stackoverflow.com/users/3347', 'pm_score': 0, 'selected': False, 'text': '<p>How are you adding the environment variable?</p>\n\n<p>Without using any external tools, you can <a href="http://www.windowsnetworking.com/kbase/WindowsTips/WindowsNT/AdminTips/Miscellaneous/SetEnvManipulateNTEnvironmentalVariables.html" rel="nofollow noreferrer">add it to the registry</a>.  Then, your test of opening a new command window will reflect your change.</p>\n'}, {'answer_id': 302957, 'author': 'Rob Mensching', 'author_id': 23852, 'author_profile': 'https://Stackoverflow.com/users/23852', 'pm_score': 1, 'selected': False, 'text': "<p>Why are you using a CustomAction for this?  The Windows Installer supports modifying environment variables natively.  Also, I think the Windows Installer sends a broadcast message to update the system when environment variables change.  That may mean you don't need to reboot... but it's been a while since I tried so YMMV. </p>\n"}]
['https://Stackoverflow.com/questions/40311', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3114/']