?
Solved

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

Posted on 2009-07-05
5
Medium Priority
?
2,311 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
[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
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

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!

Question has a verified solution.

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

No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
OfficeMate Freezes on login or does not load after login credentials are input.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

765 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