I work with a program that has an add-on module that only requires a
modification to the environmental variables PATH statement no installation.
I'm looking to use a VBScript to append the PATH statement in the System
Vaiables for that workstation.
I need to add "J:\MyProg\Folder;J:\MyProg" to the PATH statement. I'm still
new at this VBScripting but it would make my life easier instead of running
to all the machines and added this setting.

Any help or suggestions are great.
thanks
rob bartley

Re: Append Path Statement for System Level Environmental Variables by Torgeir

Torgeir
Fri Dec 05 09:47:57 CST 2003

Rob wrote:

> I work with a program that has an add-on module that only requires a
> modification to the environmental variables PATH statement no installation.
> I'm looking to use a VBScript to append the PATH statement in the System
> Vaiables for that workstation.
> I need to add "J:\MyProg\Folder;J:\MyProg" to the PATH statement. I'm still
> new at this VBScripting but it would make my life easier instead of running
> to all the machines and added this setting.

Hi


I always use the command line utility Pathman.exe to modify the path
programmatically (NT4, Win2k and WinXP). It will e.g. handle repeated entries
correctly. A logoff/logon is necessary to see the changes.

Here is the one from the free part of the Windows 2000 Resource kit
(It works on WinXP and Win Nt 4.0 as well):

Download Pathman.exe from here:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/default.asp

Run pathman /? in a command prompt for more help...


It's in the Windows Server 2003 Resource Kit Tools as well:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

Windows Server 2003 Resource Kit Tools will install on WinXP or later.


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter