The installer modifies the PATH variable; the changes are not displayed in the shell

I added a custom installation action to my installer to add one of my installation directories to the System PATH environment variable. After starting the installer, the PATH variable reflects the changes (when I access it through the Control Panel :: System applet), but when I launch a new command shell, the PATH variable does not reflect the changes. Is there something that I cannot do that causes this?

+5
source share
5 answers

I think it depends on how you launch the new Command shell. For example, when you change the PATH environment variable in the system properties, the change is not reflected until you open a new command prompt. I think that when you start the new cmd process (for example, from the Run dialog box), you get a new copy of all environment variables, but if you start the command line in a different way, then you do not.

For something done with a script, you may need to restart before you notice the change.

+2
source

How do you run the shell? Using TaskManager?

, Explorer - , , ( Windows Explorer ) PATH. , .

, ...

+2

CustomAction? Windows . , , Windows . , ... , YMMV.

+1

?

- . .

0

All Articles