?
Solved

Scheduled Tasks job loses password when coping to another computer

Posted on 2006-07-14
6
Medium Priority
?
778 Views
Last Modified: 2008-03-05
I have a job from "Scheduled Tasks" that I want to copy to other computers on our network.  Even thought the username/password are the same, I still need to put the password in again after copying the task to a new computer.

In other words, after you take the job file from "C:\WINDOWS\Tasks" and copy it to another computer, it fails to run unless you re-enter the password.  I would like to be able to copy the file to other computers on the network and have it work without having to open up the task scheduler, double click on the task, click set password, etc.  I'm not sure if there is a place in the registry where the password is kept.  If so, I could just import a reg file.  Maybe it's more complicated and I need to make a VB program that uses an API to insert the password.

Does anyone have any information on how to put in the password without going into "Scheduled Tasks".  Thanks in advance!
BPL
0
Comment
Question by:bpl5000
[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
  • 2
  • 2
6 Comments
 
LVL 59

Expert Comment

by:LeeTutor
ID: 17111390
According to this MSKB article, scheduled tasks cannot be run without a password "by design":

http://support.microsoft.com/default.aspx?scid=kb;en-us;310715
Scheduled Tasks Cannot Run with a Blank Password

I doubt that the scheduled task password can be imported into the registry, for it is probably encrypted, as a security measure.  (Perhaps someone else will know differently.)

>Maybe it's more complicated and I need to make a VB program that uses an API to insert the password.

Could be...
0
 
LVL 21

Accepted Solution

by:
mastoo earned 1000 total points
ID: 17111535
Make a cmd file to create the task and then use SchTasks to create the task.  For a limited number of remote systems, you can just copy and paste the line in the cmd file, changing the /S parameter to specify a remote system to create the task on.  Help is available from a command prompt by typeing SchTasks /?
0
 
LVL 5

Author Comment

by:bpl5000
ID: 17112765
That's awesome!  I did not know schtasks.exe existed.  Thanks for the info mastoo!
0
 
LVL 5

Author Comment

by:bpl5000
ID: 17112861
Just in case anyone has the same question, here is how you can enter the password for a scheduled task from a cmd or batch file:

schtasks /change /ru myuser /rp mypassword /tn taskname

So when users log into the network, the mytask.job file will be copied to the c:\windows\tasks folder and the password will be entered.  Walla!  A new scheduled task transferred to all computers in the workplace without leaving the office :)

Thanks to mastoo and EE!
0
 
LVL 21

Expert Comment

by:mastoo
ID: 17112879
Glad it helped.  The old command prompt still lives.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

764 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