Solved

Windows 2008 R2 - Schedule task not Running when logged off

Posted on 2013-05-24
9
5,659 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
  • 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 53

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 53

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 500 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

With Windows evolving further, the built-in protective mechanisms get better and better. Still, Microsoft is not very good at introducing those to the technical community. This article is about a new bitlocker functionality that could revolutionize …
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now