Re: Scheduling Jobs using WMI



This is not possible with this class.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Ravi" <ravikanth.chaganti@xxxxxxxxx> wrote in message
news:1121351906.981910.84330@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I am trying to invoke an application on a remote server. I would want
> that application to be interactive and so I am not using Win32_Process
> to invoke the app. Instead, I am using Win32_ScheduledJob.Create method
> to schedule the job. Here is my code:
> strComputer = "Mars"
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" _
> & strComputer & "\root\cimv2")
> JobID = "MailLocator"
> Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
> errJobCreate = objNewJob.Create _
> ("MailLocator.exe", "********154900.000000-420", _
> , , ,True, JobId)
>
> Now, I want the job to execute immediately after I create it. Something
> similar to "at now <command>".
>
> How can I do this using WMI?
>
> Thanks
> Ravi
>


.



Relevant Pages

  • Re: Using ldifde & csvde
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... > How can I get the Windows 2000 versions and will they work with a Windows ... >> Use of included script samples are subject to the terms specified at ...
    (microsoft.public.windows.server.active_directory)
  • RE: SQLSink Sample
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Use of included script samples are subject to the terms specified at ...
    (microsoft.public.vsnet.enterprise.tools)
  • Re: Convert Express To Server
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Use of included script samples are subject to the terms specified at ...
    (microsoft.public.sqlserver.setup)
  • Re: Lost admin access to ADAM
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Use of included script samples are subject to the terms specified at ...
    (microsoft.public.windows.server.active_directory)
  • Re: Programmatically replicate an Active Directory partition
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... > Use of included script samples are subject to the terms specified at ...
    (microsoft.public.windows.server.active_directory)

Loading