Solved

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

Posted on 2009-07-05
5
2,095 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
Comment Utility
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
Comment Utility
any advancements?
0
 
LVL 1

Author Comment

by:apitech
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

9 Experts available now in Live!

Get 1:1 Help Now