I am trying to set the PATH environment variable in windows 7 using a bat-file; however it does not seem to work.
I am using this windows command:
se
A simple (may be better) solution is to use PathMgr.cmd
Down the pathmgr_1.0.2.zip in https://gallery.technet.microsoft.com/Batch-Script-To-Manage-7d0ef21e
Unzip and put the pathmgr.cmd in the same folder as your batch file, then in your batch file write these two lines:
call pathmgr.cmd /del %cd% /y
call pathmgr.cmd /add %cd% /y
This will:
1) only update the user variable PATH, 2) will not include system PATH multiple times
You can also run the batch file multiple times, and it will only include your current path ONCE in the PATH.