Solved

Script to Populate the Virtual PC Console

Posted on 2007-04-08
3
710 Views
Last Modified: 2008-03-03
Has anybody got a nice script that will remove all of the Virtual PCs from the Virtual PC console (without deleting the .vmc files) and then add all the .vmc files from a specified folder into the Virtual PC Console.
0
Comment
Question by:KCTS
[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
3 Comments
 
LVL 7

Expert Comment

by:avatar-e
ID: 18874474
Just add or remove shortcuts to VMC files from:
C:\Documents and Settings\<Username>\Application Data\Microsoft\Virtual PC\Virtual Machines\

From a BAT file you can create shortcuts with:
http://www.xxcopy.com/download/xxmklink.zip

This way (to add 2 machines to VPC menu):
xxmklink "C:\Documents and Settings\<Username>\Application Data\Microsoft\Virtual PC\Virtual Machines\Windows XP Machine.lnk" "c:\Virtual Machines\Windows XP\XP.vmc"
xxmklink "C:\Documents and Settings\<Username>\Application Data\Microsoft\Virtual PC\Virtual Machines\Windows 2000 Machine.lnk" "c:\Virtual Machines\Windows 2000\2000.vmc"
...

Then delete that .lnk files to remove the machines.
0
 
LVL 70

Author Comment

by:KCTS
ID: 18874722
Any way of enumerating all the VPCs in a particular folder and adding them automatically? I  run some microsoft courses that use VPC and some of them have a new VPC for each module so there can be as many as 15 VPCs to add to the console each time.
0
 
LVL 7

Accepted Solution

by:
avatar-e earned 500 total points
ID: 18876237
VPC sorts VM alphabetically, so add a number or abything to the script:

xxmklink "C:\Documents and Settings\<Username>\Application Data\Microsoft\Virtual PC\Virtual Machines\1. Windows XP Machine.lnk" "c:\Virtual Machines\Windows XP\XP.vmc"
xxmklink "C:\Documents and Settings\<Username>\Application Data\Microsoft\Virtual PC\Virtual Machines\2. Windows 2000 Machine.lnk" "c:\Virtual Machines\Windows 2000\2000.vmc"
...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

707 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