Solved

Scheduled Tasks job loses password when coping to another computer

Posted on 2006-07-14
6
762 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
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 250 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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