' https://msdn.microsoft.com/en-us/library/aa394599(v=vs.85).aspx [WMI Tasks: Processes]
On Error Resume Next
Set FSO = CreateObject("Scripting.FileSystemObject")
Set MSIE = CreateObject("InternetExplorer.Application")
computer = "."
Set ScheduledJob = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & computer & "\root\cimv2").ExecQuery("select * from Win32_ScheduledJob")
MSIE.Visible = True
SetupMSIE
MSIE.Document.Write "
Scheduled Jobs" & _
""
MSIE.Document.Write "Displaying tasks created " & _
"with WMI or the AT command:
" & _
""
For each ejob in ScheduledJob
IEWrite "Caption", EJob.Caption
IEWrite "Command", EJob.Command
IEWrite "Days Of Month", EJob.DaysOfMonth
IEWrite "Days Of Week", EJob.DaysOfWeek
IEWrite "Description", EJob.Description
IEWrite "Install Date" ,EJob.InstallDate
IEWrite "Interact With Desktop", EJob.InteractWithDesktop
IEWrite "Job ID", EJob.JobID
IEWrite "Job Status", EJob.JobStatus
IEWrite "Name", EJob.Name
IEWrite "Notify", EJob.Notify
IEWrite "Owner", EJob.Owner
IEWrite "Priority", EJob.Priority
IEWrite "Run Repeatedly", EJob.RunRepeatedly
IEWrite "Start Time", EJob.StartTime
IEWrite "Status", EJob.Status
IEWrite "Time Submitted", EJob.TimeSubmitted
IEWrite "Until Time", EJob.UntilTime
IEWrite " ", " "
Next
MSIE.Document.Write "
End of List" & _
""
Sub SetupMSIE
MSIE.Navigate "About:Blank"
MSIE.ToolBar = False
MSIE.StatusBar = False
MSIE.Resizable = False
Do
Loop While MSIE.Busy
SWidth = MSIE.Document.ParentWindow.Screen.AvailWidth
SHeight = MSIE.Document.ParentWindow.Screen.AvailHeight
MSIE.Width = SWidth/2
MSIE.Height = SHeight/2
MSIE.Left = (SWidth - MSIE.Width)/2
MSIE.Top = (SHeight - MSIE.Height)/2
MSIE.Visible = True
End Sub
Sub IEWrite(Caption,Prop)
MSIE.Document.Write "| " & Caption & " | " & _
" | " & Prop & _
" |
"
End Sub