khaledocom
Technical User
Dear friends,
Please help me to do the above.
The following is the code I wrote to add but it didn't work.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")errJobCreated = objNewJob.Create _
("C:\222\test.xls", "********073000.000000-420", _
True , 1 Or 2 Or 4 Or 8 Or 16, 32 ,64 , JobID)
Wscript.Echo errJobCreated
Please correct it and give me another code to delete same task.
Thanks in advance.
Please help me to do the above.
The following is the code I wrote to add but it didn't work.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")errJobCreated = objNewJob.Create _
("C:\222\test.xls", "********073000.000000-420", _
True , 1 Or 2 Or 4 Or 8 Or 16, 32 ,64 , JobID)
Wscript.Echo errJobCreated
Please correct it and give me another code to delete same task.
Thanks in advance.