Solved

How to use SCHTASKS in DOS to run a task when user is not logged on

Posted on 2009-07-05
5
2,118 Views
Last Modified: 2013-12-04
I have successfully created a task in DOS to run in the Windows Server 2008 Task Scheduler, using the DOS SCHTASKS command and syntax.

The task runs successfully, but only if I as Administrator am logged in.

If I am not logged in, the task does not run.  Even if I go into Task Scheduler and tell the task to run at the scheduled time whether I am logged in or not, the task does not run.

My guess is that once the task is created in DOS, you cannot edit it in the Task Scheduler without breaking it.

Is there a syntax in DOS that will, upon creating the task, allow the task to run whether the user is logged in or not?
0
Comment
Question by:apitech
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:jfer0x01
ID: 24781880
Hi, Im pretty sure that if your task is a .bat file, the scheduler should have no problem executing

But, make sure to place your user and password on the task scheduler object while making the task

I think, as you are finishing the scheduler wizard, near the end should be an option for "Run As" and place your loggin credentials, this option is also found in the Tasks Screen

Have you tried this?

Jfer
0
 
LVL 9

Expert Comment

by:jfer0x01
ID: 24812806
any advancements?
0
 
LVL 1

Author Comment

by:apitech
ID: 24874532
Here's the scoop.  This cannot be done in Windows Server 2008, since 2008 will not interact with the desktop.
0
 
LVL 1

Accepted Solution

by:
apitech earned 0 total points
ID: 24874536
Here's the scoop.  This cannot be done in Windows Server 2008, since 2008 will not interact with the desktop.
0
 
LVL 9

Expert Comment

by:jfer0x01
ID: 24875496
Ok,

does your user have "Log on as batch jobs" rights?

Does the user have a security entry inside the .bat file in question, for both NTFS and share permissions if necessary?

Is the .bat file in a public folder or a folder readable to the user account?

Did you place Win2003 Compatibility on the Task?

Did you check "Run whether user is logged in or not in the task"?

I did all these things, and it works

What do you mean by interact with Desktop? In what sense?

Jfer
0

Featured Post

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

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

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
OfficeMate Freezes on login or does not load after login credentials are input.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

912 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

16 Experts available now in Live!

Get 1:1 Help Now