• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 785
  • Last Modified:

Scheduled Tasks job loses password when coping to another computer

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
bpl5000
Asked:
bpl5000
  • 2
  • 2
1 Solution
 
LeeTutorretiredCommented:
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
 
mastooCommented:
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
 
bpl5000Author Commented:
That's awesome!  I did not know schtasks.exe existed.  Thanks for the info mastoo!
0
 
bpl5000Author Commented:
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
 
mastooCommented:
Glad it helped.  The old command prompt still lives.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now