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
adamdaviddoyle

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
dmex

 

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
adamdaviddoyle

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
adamdaviddoyle

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
adamdaviddoyle

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
dmex

 

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
adamdaviddoyle

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
adamdaviddoyle

Windows 7
 
 

Just rebooted after adding the key

no good
My System SpecsSystem Spec
24 Jul 2009   #9
dmex

 

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
adamdaviddoyle

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
Thread Forum
Win7 Scheduled Tasks
Starting to Deploy Win7Pro and found Task Scheduler different from XP. We run a command that powers systems off at a specific time. The command will shut the system down when no user is logged in and gives a logged in user a pop up cancel window to abort if they're working. I cannot seem...
General Discussion
Services vs Scheduled Tasks
Hello, First of all i want to say hello to everyone as this is my first post here! Good to meet everyone. Secondly I was wondering about the differences between Services and Tasks. From what I have heard, read about services in windows 7 it seems that they run in an isolates session (I think...
General Discussion
Report of scheduled tasks?
Does anyone know of a way to get a human-readable report or tablular printout of all scheduled tasks with triggers/actions/conditions/settings? It would help me to understand better what's going on and to optimize things. TIA
General Discussion
Scheduled Tasks
Good Morning everyone. I hope everyone's Thanksgiving was pleasant and safe. I am trying to create a task to run Wtvwatcher at a specific time. Unfortunately it is not working. I have searched several forums and blogs and I still cannot do it correctly. When the scheduler asks for a program I...
General Discussion
Scheduled Tasks in Win7
Hi, how can I access and disable scheduled tasks in Windows 7 Ultimate? Thanks.
Performance & Maintenance
Changing scheduled tasks
I am attempting to adjust settings in the Task Scheduler to have a Restore Point created daily. I am using the approach as defined here. However, I have no "New", "Edit", or "Delete" tabs at the bottom of the Triggers page. I have full admin rights on my account (I think) Thanks in...
Performance & Maintenance


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 00:49.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App