title: VBS to create scheduled task
body: <p>I found this code on the net to create a scheduled task, but I also need to add code that will make the task run with elevated privileges (ie bypass UAC) as well as run the task immediately if the scheduled run time is missed. Have searched high and low for the syntax to no avail. By the way I am not familiar with VBS at all, only python and java, but my company codes all their scripts in VBS. So please explain the solution to a total VBS novice. Thanks. </p>
  
  <pre><code>strComputer = "."
  Set objWMIService = GetObject("winmgmts:" _
      &amp; "{impersonationLevel=impersonate}!\\" &amp; strComputer &amp; "\root\cimv2")
  Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
  errJobCreated = objNewJob.Create _
      ("C:\DDR Tools\Ninite.exe", "********120000.000000-480", _
          True , 1 OR 16, , True, JobID) 
  Wscript.Echo errJobCreated
  </code></pre>