windows - Changing the PATH from a batch -


I am writing a dos batch where I need to change PATH .

I am using the SET command.

The batch is run from the command line ( cmd.exe ).

Problem: Changes are only available for the cmd window, and as soon as this window closes, the changes are dismissed.

I PATH from a batch and make sure that the change will affect the entire system?

A tool SEX.XA Variable can be used to change:

  setx path "% PATH%; C: \ new folder"  

Source:

The above link also places the registry keys, which store the system / user environment variables - if you are feeling brave then you can also try setting them.

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ session manager \ environment

Comments