1.

Solve : Permanently change the PATH from within a DOS Batch File?

Answer» QUOTE from: iONik on April 15, 2009, 03:41:46 PM
Here's my mountain of code to do the job I was after...

Code: [Select]@echo off
set vara=%PATH%
set varb=;%SYSTEMROOT%\sysfiles
set VARC=%vara%%varb%
setx PATH %varc% -m
set vara=
set varb=
set varc=
not really sure the set vara=, set varb=, set varc= is necessary.



Nope. To add \dir to path: (you append it)

set path "%path%;\dir"

see here:

http://www.google.co.uk/search?source=ig&hl=en&rlz=&=&q=setx+path&btnG=Google+Search&meta=lr%3D

Quote from: Dias de verano on April 15, 2009, 03:48:58 PM
Nope. To add \dir to path: (you append it)

set path "%path%;\dir"

see here:

http://www.google.co.uk/search?source=ig&hl=en&rlz=&=&q=setx+path&btnG=Google+Search&meta=lr%3D



My "mountain of code" (not really) does do the trick, but you have cut that BACK about as far as it can go I'd guess.

But I will need SETX

Code: [Select]setx PATH "%PATH%;C:\Windows\newdir" -m


Discussion

No Comment Found