Virtual PC 2004 / 2007 –> Start a Virtual PC 2004 / 2007 VM Via Batch File in Scheduled Tasks

2010-02-08 Initial Post

If you're using Hyper-V, you don't need to do this because Hyper-V has settings in the GUI for VM startup and shutdown. This post is only for Virtual PC 2004 / 2007 (I haven't used Virtual Server 2005 so I can't comment on that). I still use Virtual PC 2007 because I have to keep my home host computer on Windows XP, otherwise I would switch to Hyper-V.

Based on info from http://www.windowsitpro.com... on 2010-02-08:

The article is for Virtual PC 2004, but the same concept works with Virtual PC 2007 also.

Here is an example command to start up a VM:

[batch]
"C:\Program Files\Microsoft Virtual PC\Virtual PC.exe" -pc "VM-1" -launch -singlepc
[/batch]

"VM-1" would be the name of the VM as displayed in the Virtual PC Console.

You can create a a batch file with this command and add it to a scheduled task to start up your VMs at host startup or at a specific time. The other cool thing I found was that you can also browse to the host’s scheduled tasks share and manually start the task to start up a particular VM. For example, I browse to \\HOST-XP-1 and then to its Scheduled Tasks share. From there I can just right-click on the particular VM startup task and select Run.

Leave a Reply