Solved

Scheduled Tasks job loses password when coping to another computer

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 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