ok, so I'm trying to do something incredibly simple... but for the life of me, I can't get it to work right...
I'm pretty much writing a VBS file that calls an exe... only issue is, the exe has spaces in it's path and won't work... if I take the spaces out of the path, it works fine how do I fix it?
Attached is the code that I'm using.
The reason why I'm using it is I'm trying to remotely call the exe off of a website... I have the code in there for it to populate the computer name, but for this example, I figure it's just easier to make it call the local host name.
*******************************
strComputer = "."
strCommand = "C:\Program Files\McAfee\VirusScan Enterprise\mcupdate.exe"
Const INTERVAL = "n"
Const MINUTES = 1
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objScheduledJob = objWMIService.Get("Win32_ScheduledJob")
Set objSWbemDateTime = CreateObject("WbemScripting.SWbemDateTime")
objSWbemDateTime.SetVarDate(DateAdd(INTERVAL, MINUTES, Now()))
errReturn = objScheduledJob.Create(strCommand, objSWbemDateTime.Value, False, 0, 0, True, intJobID)
****************************