Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.



Windows 7: View Scheduled Tasks via VNC

24 Jul 2009   #1

Windows 7
 
 
View Scheduled Tasks via VNC

I am running windows 7 RC in our corporate environment. We hope to start deploying in october. One issue I have is the ability to view the Scheduled Tasks for an XP machine via UNC path seems to be gone, I can't find any information about re-enabling this. Anyone have any insight?

My System SpecsSystem Spec
.

24 Jul 2009   #2

 

Quote   Quote: Originally Posted by adamdaviddoyle View Post
I am running windows 7 RC in our corporate environment. We hope to start deploying in october. One issue I have is the ability to view the Scheduled Tasks for an XP machine via UNC path seems to be gone, I can't find any information about re-enabling this. Anyone have any insight?
Hi Adam,

What method are you currently using to view the Scheduled Tasks on remote machines using a UNC path? Is it something like WMI or an application?

You can use this WMI script to view all Scheduled Tasks on remote machines, if there connected to a domain network you just need to replace "." after strComputer with the UNC path of the remote machine

WMI Tasks: Scheduled Tasks (Windows)

Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\"_
    & strComputer & "\root\cimv2")
Set colScheduledJobs = objWMIService.ExecQuery _
    ("Select * from Win32_ScheduledJob")
For Each objJob in colScheduledJobs
    Wscript.Echo "Command: " & objJob.Command & VBNewLine _
    & "Days Of Month: " & objJob.DaysOfMonth & VBNewLine _
    & "Days Of Week: " & objJob.DaysOfWeek & VBNewLine _
    & "Description: " & objJob.Description & VBNewLine _
    & "Elapsed Time: " & objJob.ElapsedTime & VBNewLine _
    & "Install Date: " & objJob.InstallDate & VBNewLine _
    & "Interact with Desktop: " _
        & objJob.InteractWithDesktop & VBNewLine _
    & "Job ID: " & objJob.JobId & VBNewLine _
    & "Job Status: " & objJob.JobStatus & VBNewLine _
    & "Name: " & objJob.Name & VBNewLine _
    & "Notify: " & objJob.Notify & VBNewLine _
    & "Owner: " & objJob.Owner & VBNewLine _
    & "Priority: " & objJob.Priority & VBNewLine _
    & "Run Repeatedly: " & objJob.RunRepeatedly & VBNewLine _
    & "Start Time: " & objJob.StartTime & VBNewLine _
    & "Status: " & objJob.Status & VBNewLine _
    & "Time Submitted: " & objJob.TimeSubmitted & VBNewLine _
    & "Until Time: " & objJob.UntilTime
Next
There are a few other methods of extracting the information you require, it just depends how you doing it now?

Steven
My System SpecsSystem Spec
24 Jul 2009   #3

Windows 7
 
 

Well,

Currently we are running Windows XP everywhere and with Windows XP when you hit

\\pcname unc path, the scheduled tasks are just there.

With windows 7 it seems they've removed that functionality. I was hoping it was just a security setting we can toggle off.
My System SpecsSystem Spec
.


24 Jul 2009   #4

Windows 7
 
 

Can you pass like a %1 variable for the PC name so that you don't have to modify the script file every time and just launch it from the run prompt?
My System SpecsSystem Spec
24 Jul 2009   #5

Windows 7
 
 

I saved that script as a .vbs and run it from the command prompt and it returns no value

C:\>cscript sched_tasks.vbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

C:\>
My System SpecsSystem Spec
24 Jul 2009   #6

 

Quote   Quote: Originally Posted by adamdaviddoyle View Post
Well,

Currently we are running Windows XP everywhere and with Windows XP when you hit

\\pcname unc path, the scheduled tasks are just there.

With windows 7 it seems they've removed that functionality. I was hoping it was just a security setting we can toggle off.

Edit: It appears WMI aka vbscript is useless for tasks created using Task Scheduler unless they where created using WMI in the first place.. wtf

I cant believe this still hasn't been fixed, wtf 2x

Quote:
However, suppose you say to yourself, “Hey, as long as I have the Task Scheduler open I might as well schedule a second task.” Let’s say you do so. That task, created by the Task Scheduler, will not be visible to your WMI scripts. The Task Scheduler can deal with tasks created by WMI, but WMI cannot deal with tasks created by the Task Scheduler.
Even worse, suppose you use Task Scheduler to modify the task you originally created with WMI. That task will be successfully modified, but you’ll no longer be able to access it using WMI, even though WMI created the thing in the first place. Yes, we know. And, hopefully, this problem will be corrected in future versions of Windows. And, yes, we know: that doesn’t really help you much right now, does it? Sorry.
You can try these other solutions...

Windows 7 includes PowerShell with much more powerfull scripting and output, you can output to multiple formats (doc, pdf, html...) and present the information in multiple ways...

For example you can output a list of scheduled tasks into CSV format about 2x faster than using the vbscript/WMI above and it aparently works where WMI/vbscript fails

geekpoet: Powershell script to report on all scheduled tasks in our domain

There are many others but you should be able to give this one a try...

As a last resort you can try re-adding the folder into the Network Shares view.

warning   Warning
I have no idea if this will work and incorrect security settings set for this key will allow anyone to view/edit remote tasks on that machine, You have been warned!


(I figure you might be able to re-add the folder by doing the reverse of removing it for XP
Hide the Scheduled Tasks and Printers folder in the network share view )

Goto:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \RemoteComputer \ NameSpace
Add the following key:
{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
Like I said I have no idea if its even possible or the repercussions of doing that, I think powershell is the best bet since its fully scripable and seems to work...

If you need some help getting the Powershell script running or modifying it for remote machines let me know and ill see what I can do
My System SpecsSystem Spec
24 Jul 2009   #7

Windows 7
 
 

Quote   Quote: Originally Posted by dmex View Post
(I figure you might be able to re-add the folder by doing the reverse of removing it for XP
Hide the Scheduled Tasks and Printers folder in the network share view )

Goto:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \RemoteComputer \ NameSpace
Add the following key:

{D6277990-4C6A-11CF-8D87-00AA0060F5BF}


I was wondering the same thing, I recall seeing this as a performance tweak for XP to remove the feature. I'll give this a shot on my virtual machine and see if it works!
My System SpecsSystem Spec
24 Jul 2009   #8

Windows 7
 
 

Just rebooted after adding the key

no good
My System SpecsSystem Spec
24 Jul 2009   #9

 

Quote   Quote: Originally Posted by adamdaviddoyle View Post
Just rebooted after adding the key

no good
I just found this: CodeProject: A New Task Scheduler Class Library for .NET. Free source code and programming help

if you have anyone about the office who knows some C# they can use this library to create a custom application for the same thing but it would need to be run on each machine

Give the powershell script a try, there are quite a few of them and from what Ive been reading its the only way your going to be able to retireve the scheduled tasks minus using that library above

If worst comes to worst I can knock up a basic app using that library to accomplish what your after and upload the source-code here, I would prefer not to have to goto that length since powershell is more than capable
My System SpecsSystem Spec
24 Jul 2009   #10

Windows 7
 
 

Thanks for your help, We have a dev here that might be able to (he's pretty tied up so i might not get an answer for a while.)

I've gone to my server guys to see if they can pull reports of this data from our System Center Configuration Manager server (SMS).
My System SpecsSystem Spec
Reply

 View Scheduled Tasks via VNC





Thread Tools



Similar help and support threads for2: View Scheduled Tasks via VNC
Thread Forum
Win7 Scheduled Tasks General Discussion
Services vs Scheduled Tasks General Discussion
Scheduled Tasks General Discussion
Scheduled Tasks in Win7 Performance & Maintenance
Changing scheduled tasks Performance & Maintenance
Run scheduled tasks in background Performance & Maintenance
Scheduled Tasks (what to remove) General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 02:34 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33