?
Solved

Windows 2008 R2 - Schedule task not Running when logged off

Posted on 2013-05-24
9
Medium Priority
?
6,323 Views
Last Modified: 2013-07-02
Hi, We have the following environment

Windows 2008 R2 Server fully patched Terminal Server
Logging in as Domain admins

Issue:
Unable to run vb application via task schedule when set to run when either logged off or locked

Tests:
Ran schedule task to open notepad and notepad opens when you set the task to run only when logged on.

When we run the same task to open notepad but set to run when either logged off or locked  it doesn't open notepad but you can see the notepad.exe running in task manager.

So, I believe if wen can get notpad to open when the schedule task properties are set to run when logged off this will fix the issue with or vb program.

My hunch is it has something to do with Group policy or Security settings.  Even then the task is running as domain administrator and we are logged in as the domain administrator.

I have also tested on a windows 8 machine that is not part of the domain and the same issues occur

Cheers,
Troy
0
Comment
Question by:troyComp14
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 6

Expert Comment

by:BurundiLapp
ID: 39193766
From what you're saying it sounds like notepad.exe does run but you don't see the notepad window popping up, is that right as this is what I would expect if you are not logged in or the screen is locked, notepad is a program that requires user interaction so it requires an active desktop to display on.

Bringing up notepad is not a normal use for task scheduling, you would normally use it to perform maintenance tasks in the background that require no user interaction so this behaviour is normal.

What parameters in the run and startup fields are you using to launch the vb app?  I presume the VB app doesn't present any screens requiring user interaction when it is running as that would make it unsuitable for scheduling.

Does the vb app run fine from a command line on the same server?

Have you ticked the 'run whether user is logged on or not' tick box on the scheduled task?
0
 

Author Comment

by:troyComp14
ID: 39193838
All the testing is done when I am logged on viewing the screen and running the scheduled task manually.

We have this program on a number of servers and I am only aware of the issue on 2008 server.

The VB program has a /noui agrument which means no user interface is presented.  When we are testing we remove this argument to ensure the program actually opens up requiring user interaction so we can see if the task schedule is working probably.  On this particular server it doesn't happen, so we came up with the test from other forums to try and open up notepad from a schedule task to ensure it isn't the VB program.

To recap:
1) I am logged on the server as the domain administrator
2) I ran the task MANUALLY with the 'run whether user is logged on or not' tick box CHECKED.  Notepad doesn't launch
3) I run the task again with the "run whether user is logged on or no" tick box UNCHECKED
and Notpad Launches.

So I believe point 2) should work as I am logged on therefore notepad should lauch
0
 
LVL 6

Expert Comment

by:BurundiLapp
ID: 39193865
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Mike Schultz
ID: 39193975
In the scheduled task
under the Actions tab
select edit
In the field "Start in (Optional) - enter the location (folder) where the script sits that you are running

I has simuliar issue pulling info from an AD group and creating a txt file with that info.
Worked when launched manually but not from the scheduled task until I did the above.
0
 
LVL 56

Expert Comment

by:McKnife
ID: 39194600
Hi.

As said before: normal behavior. You are storing a password, so imagine the following scenario: someone else is logged on and the task starts notepad interactively (=visible)... this would enable that someone to act as another user... good-bye, security!
That's why notepad does not show up - it runs non-interactive for securiry reasons.
0
 

Author Comment

by:troyComp14
ID: 39249388
We still haven't been able to resolve the issue.

We have this application installed on hundreds of servers and it only seems to be an issue on 2008R2
0
 
LVL 56

Expert Comment

by:McKnife
ID: 39249698
Name one OS that displays it, please.
0
 
LVL 6

Expert Comment

by:BurundiLapp
ID: 39249844
I think we are getting away from the real issue which is the VB app is not working when the OP tries to run it as a scheduled task.  Lets forget about notepad not running and concentrate on the VB app.

Does wscript or cscript run at all when the scheduled task for the VB app runs?

Does it generate a failure error in the scheduled tasks manager, if so what is the code it is generating?
0
 
LVL 2

Accepted Solution

by:
Mike Schultz earned 1500 total points
ID: 39252858
Was this tired?

In the scheduled task
under the Actions tab
select edit
In the field "Start in (Optional) - enter the location (folder) where the script sits that you are running

I has simuliar issue pulling info from an AD group and creating a txt file with that info.
Worked when launched manually but not from the scheduled task until I did the above.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
The goal of this Micro Tutorial is to help navigate beginning users with the app store on Windows 8. It will explain exciting features how to maximize your PC through these apps. This will be demonstrated using Windows 8 operating system.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question