The Rhyme of Sim'

Simon Hampel

  • facebook
  • twitter
  • linkedin
  • vimeo
  • github
  • stackoverflow
  • steam
  • Home
  • About
  • Trip Journals
    • Colombia 2012
    • Little Desert NP Road Trip 2010
    • Adelaide Road Trip 2009
    • Colombia 2009
    • Melbourne 2008
    • South America 2008
    • United States 2005
    • Perth 2004
    • Adelaide Road Trip 2003
    • Hong Kong 2003
  • Archives
  • Contact
  • The Rhyme of Sim'
You are here: Home / Technology / How to convert scheduled tasks from Windows XP to Windows 7

How to convert scheduled tasks from Windows XP to Windows 7

Wednesday 15th December, 2010 5 Comments

When I decommissioned my Windows Home Server recently, I decided to replace it with Windows 7. However, I had over 20 scheduled tasks running on the WHS box to do things like back up my websites and backup files on the server and such.

I wanted to recreate these scheduled tasks on the new Windows 7 install, but discovered that Microsoft had changed the format for scheduled tasks in Win7 and provided no mechanism for importing the old .job files from Windows XP / Windows 2003. Windows 7 now uses XML files for import and exporting task definitions – but no conversion tool from the old .job format.

I really didn’t want to be spending the time manually recreating all of these tasks, but a bit of Google research found a possible solution involving remote invocation of the schtasks command line tool. Here’s what I did.

The first issue was that I had already decommissioned the WHS install, although I did save the C & D partitions on the system drive so I could have theoretically booted it up again. However, I had already changed some of the machine’s hardware (new MoBo, new SATA controller, etc), so that was always going to be a last resort and fraught with potential boot-up issues.

Fortunately I still had an old laptop running Windows XP, so I was able to copy the .job files I had backed up from the WHS box over to the XP machine and have them recognised by Task Scheduler there.

Next, I ran the following command on my Windows 7 laptop from an “elevated” command prompt (Start -> All Programs -> Accessories -> right mouse click on “Command Prompt” and select “Run as administrator”):

schtasks /Query /S remote_computer_name /U remote_username /P remote_password /XML > output_file.xml

… where the “remote_computer_name” was the name of my Windows XP machine, and “remote_username” and “remote_password” were for a valid administration user on that machine.

This command tells the remote machine to dump a list of all parameters for all scheduled tasks and send it to my console and the /XML flag tells the Windows 7 box to convert that information to the new XML format, and then I piped the output to a new file, “output_file.xml”.

The output was a concatenated list of all XML task data (which itself is not a valid file to import into Windows 7 task scheduler), so I used a text editor to copy and paste the individual tasks that I wanted to recreate and then used the “import” feature in Windows 7 task scheduler to import the new task. I believe there is a flag you can set to have the combined output XML for all the tasks  be valid to import directly, but I didn’t try that, preferring to manually select which of the tasks to import and doing them one at a time so I could then check the settings each time.

There are a plethora of new features and settings in Windows 7 task scheduler, so it does pay to verify and tweak any settings after importing them. I really am quite impressed with the new functionality in Windows 7 task scheduler!

« Prev: Loath vs Loathe
Next: Profile privacy on meetup.com »

Filed Under: Technology

Comments

  1. Will Beaty says

    Sunday 7th October, 2012 at 01:37 AM

    The Expert suggestions are too much trouble so I’m switching from Windows task scheduler to something different altogether so as to not run into this problem again the next time Microsoft pulls this stunt.

    Reply
  2. Sim' says

    Thursday 3rd February, 2011 at 06:41 AM

    Have you created a username with administration privileges on the Windows XP box where the tasks are?

    Reply
    • Dennis says

      Friday 4th February, 2011 at 01:40 AM

      Yes, I use “root”, which shows as Computer administrator, password protected in User Accounts. Thinking that maybe that user account was somehow reserved and/or corrupted, I created user “skeduler”, which also shows as Computer administrator, password protected in User Accounts.

      Reply
  3. Dennis says

    Thursday 3rd February, 2011 at 06:29 AM

    Unfortunately, this does not work for me. I have tried connecting to another computer from task scheduler and get “you do not have permission to access this computer” and command line schtasks /query /s gets “ERROR: Access is denied.” However, from another XP Pro system, the command line does return the task table, but of course, there is no /XML switch! At this point, I will just recreate the tasks manually, but it would be nice to know what the trick is to make this work. The problem machine is running Win 7 Pro.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Simon Hampel

Welcome to my personal blog about life, family, work, travel, technology and such.

Recent Comments

  • Rachel on The Sims 2 resolution problems – solved !Yes to this! Thanks for the advice! 2021 and I was…
  • Shaun Hargans on EchosA standard glass beer Stubby (375 ml) has a neck d…
  • Bryanna on The Sims 2 resolution problems – solved !How does one run a notepad in administrator mode?
  • Dirk Collins on Day 19 – NavimagAdditional photos of the Casma https://web.archive…
  • Dirk Collins on Day 19 – NavimagNot the Cotopaxi. The Cotopaxi was found sunk outs…

Categories

Adelaide Roadtrip 2003 Adelaide Roadtrip 2009 Adoption Colombia 2009 Colombia 2012 Community Entertainment General Hong Kong 2003 Investing Melbourne 2008 Online Photography Software South America 2008 Sydney Technology Travel University Words Work Zoos
Tweets by @SimonHampel

Strava

My Other Sites

  • PropertyChat
  • InvestEd
  • Somersoft
  • Compare Funds
  • ZooChat

Useful Information

  • AUS vs US Mens Shirt Sizes
  • Star Wars Masters & Apprentices
  • Roland GAIA SH-01 Resources
  • Roland U-20 Resources

Copyright © 2025 Simon Hampel · Log in