Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with setting path via objSysEnv

Status
Not open for further replies.

Briandr

MIS
Jul 11, 2003
177
US
Hi,

Just looking for assistance with a line I am thinking is coded wrong. Probably don't need to see all of this, but setup.exe is not being found via the statement in red. Any ideas why the path is failing to be set correctly? And yes, I did verify the folder does exist.

Thanks


'Define Constants
CONST TempFolder = "c:\windows\Dell\Kace\"
CONST LogFolderName = "Office2010"
CONST OverwriteExisting = True

'Set variables
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objSysEnv : Set objSysEnv = objShell.Environment("SYSTEM")

'Prep work prior to uninstalling Microsoft Office Standard 2010
objSysEnv("PATH") = objSysEnv("PATH") & ";C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\Office Setup Controller\"
If objFSO.FileExists("C:\ProgramData\Dell\KACE\downloads\17441\config_uninstall.xml") Then
objFSO.CopyFile "C:\ProgramData\Dell\KACE\downloads\17441\config_uninstall.xml", "C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\Office Setup Controller\", OverwriteExisting
WScript.Sleep(10000)
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top