Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I run a scheduled task when not logged in as Admin?

Status
Not open for further replies.
Sep 24, 2003
3
US
How can I run a scheduled task, created as the administrator, to run when a non-admin user is logged in? When I created the task, I set the "Run as:" to use the Admin account and password. But when I log in as a non-admin user, the task does not show up and will not run. Is there anything I can do so that this task will run at a certain time no matter who is logged in?

Thanks.
 
It really will work if scheduled with local Administrator username and password.
And the error log will tell you what is going on:
And the most likely problem troubleshooter:

Other than NTbackup, which has its own demands, use the AT command in a batch file, using navitve XP RUNAS permissions and place the commands in the All Users, Startup, Start Up, Program Folder.

The AT Scheduler is the ‘Original’ Scheduler that came with Windows NT and still remains for backward compatibility in Windows 2000 and Windows XP. The AT Scheduler service runs under the System Account. The System account is a “Super User” on that machine. It cannot access any network resources, but it has full access to all resources on the local machine. Using the AT Scheduler is the method I recommend in scheduling such tasks that require full access to the system. This will also minimize the exposure of the “All Powerful” Administrator account. To use the AT Scheduler you must be logged in as Administrator or equivalent to schedule the event.

From an old Norton Antivirus Article, clipped:

The following Microsoft Knowledgebase articles describe the use of the AT command.

HOW TO: Use the AT Command to Schedule Tasks

System and User Account Difference with AT Command
 
bcastner....thanks for the great information.[thumbsup2]

I created the task when logged in as the administrator, waited for it to run and it ran wonderfully. I then recreated the same task and logged in as a non-admin user and the task did not run; nor did it show up under the Scheduled Task window. This is the command I used:

AT 12:30 /interactive /every:M,T,W,TH,F C:\Program~1\Lavasoft\Ad-awa~1\Ad-aware.exe +c /auto /ref

Like I mentioned above, it ran fine while logged in as Admin but did not run when I logged in as a "Power User".[ponder]

Any ideas???[sadeyes]
 
But the entry in a .bat or .cmd file, and pop a link to it in:

C:\Documents and Settings\All Users\Start Menu\Programs\Startup
 
The "But" should be a "Put" above...

Also, from my own notes:

1. I would disable Fast User Switching to change users. User A does a Start, Log Off. User B does a logon;

2. All users should have real and not empty or blank passwords, and do a real logon at start. You may need to modify through Control Panel, Users, to add real passwords for your users.

bill

 
As requested, I copied the AT comand into a .bat file and put it into the startup folder. Upon bootup, I recieved the following error: Access denied ...when the batch file executed.

The non-admin account being used does have a password and was not logged onto with Fast User Switching.
 
1. Control Panel, Scheduled Tasks folder.

2. On the "Advanced" menu item, click "At Service Account".

3. Type the required account name and password, and then click OK. You can enter the Administrator username and password if you like, or just the needed local user credentials.

**This change will affect all tasks scheduled with the at command, not just your task. It is easiest to use a local Administrator account to avoid "Access Denied" or other errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top