Sign in to follow this  
Followers 0
giggity

Schedule task for all users ?

7 posts in this topic

I made an interactive script that I need to run for all users on xp pro sp2 machines at a scheduled time. Is this possible without having to know the password for every user so the script runs as them? I tried using schtasks.exe but that will only work if I know the login credentials for every user that I need the scheduled task to run for. Any ideas? :lmao:

Share this post


Link to post
Share on other sites



I made an interactive script that I need to run for all users on xp pro sp2 machines at a scheduled time. Is this possible without having to know the password for every user so the script runs as them? I tried using schtasks.exe but that will only work if I know the login credentials for every user that I need the scheduled task to run for. Any ideas? :lmao:

if you are an admin on that machine you won't need a password. If you are not an admin, I won't help you until you can explain why you would want to do that!

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

From MSDN:

By default, only a member of the Administrators, Backup Operators, or Server Operators group can create tasks. A member of the Administrators group may change the security descriptor of the Windows\Task folder to let others create tasks.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

:lmao: I am an administrator (domain administrator) and I'm able to add the task as an administrator using schtasks.exe however I need to add the task as a limited user, not an administrator so the interactive backup script i wrote runs as them. Edited by giggity

Share this post


Link to post
Share on other sites

I think you missed my point, so I'll try again with a condensed version:

A member of the Administrators group may change the security descriptor of the Windows\Task folder to let others create tasks.

:lmao:

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

:lmao: I am an administrator (domain administrator) and I'm able to add the task as an administrator using schtasks.exe however I need to add the task as a limited user, not an administrator so the interactive backup script i wrote runs as them.

I did some research and I believe it's not possible. The task scheduler needs the account information stored somewhere (added by schtasks or via the wizard), as it uses that account data to run the scheduled command via "run as". So, there seems to be no way via windows task scheduler.

You could write your own task scheduler with AutoIT and add that to the Autostart folder of every user or to the various "RUN" registry keys. Then you can run whatever you want with the proper user privileges as your task scheduler will be executed by the logged on user.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

if you are an admin on that machine you won't need a password.

I can read it also there, but why if a do:

schtasks /create /sc minute /mo 20 /tn myapp /tr path_to_myapp

it asks password even if I'm admin?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0