Re: Exporting / Altering scheduled tasks

From: Benny (NoSpam_at_Thanks.net)
Date: 06/10/04


Date: Thu, 10 Jun 2004 11:08:34 +0100

Hi Dave

Many Thanks for the advice. Looks like that will work a treat.

As you guys have done this kinda stuff before, you may know how to do this
....

I also need to change the "Start in" parameter for each of 2000 or so
scheduled tasks.
I have tried copying and altering the *.job files but as soon as I change
the text in the file and save it disappears from scheduled tasks. so I guess
it makes it invalid or something.

Do you guys know a way of automating a change of this kind ?

Thanks in advance for any ideas.

Ben

"Dave Patrick" <mail@NoSpam.DSPatrick.com> wrote in message
news:u2r6JkaTEHA.1232@TK2MSFTNGP09.phx.gbl...
> One idea might be to run from the command line;
> schtasks /query >D:\dave.txt
> then import the text file into excel and loop through the 'TaskName'
column
> and run against each of the tasks
>
> schtasks /change /ru <newuser> /rp <newpassword> /tn <taskname>
>
> D:\>schtasks /change /?
>
> SCHTASKS /Change [/S system [/U username [/P password]]] {[/RU runasuser]
> [/RP runaspassword] [/TR taskrun]} /TN taskname
>
> Description:
> Changes the program to run, or user account and password used by a
> scheduled task.
>
> Parameter List:
> /S system Specifies the remote system to connect to.
>
> /U username Specifies the user context under which the
> command should execute.
>
> /P password Specifies the password for the given user
> context.
>
> /RU username Changes the user name (user context) under
> which the scheduled task has to run.
> For the system account, valid values are "",
> "NT AUTHORITY\SYSTEM" or "SYSTEM".
>
> /RP password Specifies a new password for the existing
user
> context or the password for a new user account. Password will not effect
for
> the system account.
>
> /TR taskrun Specifies a new program that the scheduled
> task runs. Type the path and file name of the program.
>
> /TN taskname Specifies which scheduled task to change.
>
> /? Displays this help/usage.
>
> Examples:
> SCHTASKS /Change /RP password /TN "Backup and Restore"
> SCHTASKS /Change /TR restore.exe /TN "Start Restore"
> SCHTASKS /Change /S system /U user /P password /RU newuser
> /TN "Start Backup"
>
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
>
> "Benny" wrote:
> | Hi All
> |
> | I have a client who has about 2000 jobs running nightly reports in
> Schedules
> | Tasks on Win2000 Pro. He needs to move them to his new win2003 server.
But
> | when he moves them (via copy/paste) each job need various things
amending
> | before it will run. ie, user/password credentials, file paths, etc
> | Obviously he does not want to have to edit each of the 2000 jobs, so
does
> | any one know if there is a tool out there to automate changes to
multiple
> | schedule tasks like this? Or alternatively does any one know of any 3rd
> | party scheduling tools that may be easier to do these sort of things ?
> |
> | Any suggestions much appreciated.
> |
> | Ben
> |
> |
>
>



Relevant Pages

  • Re: Scheduled tasks wont run
    ... Scheduled Tasks must be run from a user account that has a password. ... but its also a large security vulnerability. ... MS-MVP Windows XP/ Windows Smart Display ...
    (microsoft.public.windowsxp.security_admin)
  • Re: user name "user"
    ... As to your second post, when I do A LOG-OFF it states “E41 is logged on as ... Are there any Scheduled Tasks set up to run under User? ... In Control Panel open Scheduled Tasks to see if that's the case. ... "user" instead of the actual name used/placed into the user account (only one ...
    (microsoft.public.windowsxp.security_admin)
  • Re: defrag ????
    ... a User Account with a blank password, which is not the same as a User ... "Tom Pepper Willett" wrote in message ... > Scheduled Tasks Cannot Run with a Blank Password ... > "Gerry Cornell" wrote in message ...
    (microsoft.public.windowsxp.general)
  • Re: Advice sought on Running XP Home SP2 as Admin or Limited User
    ... look at what updates are ... Make a note to yourself regarding the use of scheduled tasks, ... in that your single user account MUST HAVE A PASSWORD ... I have no scheduled tasks except for the CA Antivirus updates and I do not ...
    (microsoft.public.windowsxp.general)
  • Re: Exporting / Altering scheduled tasks
    ... the text in the file and save it disappears from scheduled tasks. ... > context or the password for a new user account. ... ie, user/password credentials, file paths, etc ...
    (microsoft.public.windowsxp.general)