I was thinking of using something like the Win32_ScheduledJob class but
this seems to work. Is there anyway I could check for a return type to
ensure the deletion works?
I was thinking of using something like the Win32_ScheduledJob class but
this seems to work. Is there anyway I could check for a return type to
ensure the deletion works?
Yes, call WaitForExit and get the Exit code, Exit 0 means success all else
means failed.
Win32_ScheduledJob can only be used with jobs created by Win32_ScheduledJob,
if this is your case you can query all jobs and delete each individual using
the JobId.