http://blogs.technet.com/b/heyscriptingguy/archive/2006/08/28/how-can-i-append-a-location-to-the-path-environment-variable.aspx
strComputer = "." <----- or changes this "." to computer name e.g. "computer-01"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_Environment Where Name = 'Path'")
For Each objItem in colItems
strPath = objItem.VariableValue & ";C:\Scripts\"
objItem.VariableValue = strPath
objItem.Put_
Next
This comment has been removed by the author.
ReplyDeleteGreat site for these post and i am seeing the most of contents have useful for my Carrier.Thanks to such a useful information.Any information are commands like to share him
ReplyDeleteSEO Company in Chennai