Solved

Scheduled Tasks job loses password when coping to another computer

Posted on 2006-07-14
6
737 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
  • 2
  • 2
6 Comments
 
LVL 59

Expert Comment

by:LeeTutor
Comment Utility
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 250 total points
Comment Utility
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
Comment Utility
That's awesome!  I did not know schtasks.exe existed.  Thanks for the info mastoo!
0
 
LVL 5

Author Comment

by:bpl5000
Comment Utility
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
Comment Utility
Glad it helped.  The old command prompt still lives.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

8 Experts available now in Live!

Get 1:1 Help Now