BleepingComputer.com: Batch script for ADDING directory to environmental path

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Batch script for ADDING directory to environmental path

#1 User is offline   norwood781 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 27
  • Joined: 15-July 10

Posted 07 January 2011 - 10:03 AM

I've tried creating a .bat file to add a directory to a Windows XP machine's environmental path using:

setx path "%PATH%;C:\Path\To\Directory" 


However it isn't working. From what I've read, doing this via the CLI only adds the variable to the path temporarily.

Is there a way to permanently doing it? Other than the obvious, longer approach of: My Computer>Properties>Advanced>Environmental Variables>Path>Edit

#2 User is offline   norwood781 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 27
  • Joined: 15-July 10

Posted 08 January 2011 - 09:05 AM

Anyone? This has to be possible from a scripting environment...

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users