Last active
October 15, 2015 16:39
Revisions
-
andreipak revised this gist
Oct 15, 2015 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,13 @@ ' 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 "<HTML><TITLE>Scheduled Jobs" & _ "</TITLE><BODY bgcolor=#ffffff><FONT FACE=ARIAL>" MSIE.Document.Write "<B>Displaying tasks created " & _ @@ -58,3 +62,4 @@ MSIE.Document.Write "<B>Displaying tasks created " & _ "<td> </td><td align=right>" & Prop & _ "</td></tr>" End Sub
-
andreipak revised this gist
Oct 15, 2015 . No changes.There are no files selected for viewing
-
andreipak created this gist
Oct 15, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ On Error Resume Next Set FSO = CreateObject("Scripting.FileSystemObject") Set MSIE = CreateObject("InternetExplorer.Application") Set ScheduledJob = GetObject("winmgmts:{impersonationLevel=impersonate}!\\computer\root\cimv2").ExecQuery("select * from Win32_ScheduledJob") 'SetupMSIE MSIE.Document.Write "<HTML><TITLE>Scheduled Jobs" & _ "</TITLE><BODY bgcolor=#ffffff><FONT FACE=ARIAL>" MSIE.Document.Write "<B>Displaying tasks created " & _ "with WMI or the AT command:</B><BR><BR>" & _ "<table border=0 width=100% cellspacing=0 " & _ "cellpadding=0>" 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 "</table><BR><B>End of List</B>" & _ "</FONT></BODY>" 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 "<tr><td>" & Caption & "</td>" & _ "<td> </td><td align=right>" & Prop & _ "</td></tr>" End Sub