create a schedule task through vbs and specify “start i

August 5th, 2016

hi i’ve been trying to write a script to schedule a job in a particular folder but i am not able to specify the “start in” parameter for the same through this script:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create ("c:\Installations\Samsung\Kies.bat", "********235000.000000+330", True ,8 , , , JobID) If errJobCreated <> 0 Then
Wscript.Echo "Error on task creation"
Else
Wscript.Echo "Task created"
End If

Answer #1
How does it works….

 

| Sitemap |