objWMIService = GetObject ("winmgmts: " _
& "{impersonationLevel=impersonate}! \ \" _
& strcomputer & "\ korzeń \ cimv2")
objNewJob = objWMIService.Get ("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
(" C:\temp\reboot.vbs"," ******** 012500.000000-420 ", _
Prawdziwy, 4, Prawdziwy)
Jeżeli errJobCreated <> (0) Wtedy
MsgBox (errJobCreated.ToString)
Inny
MsgBox ("Zadanie tworzyć")
Kończyć Jeżeli
|