Solved

Script to Populate the Virtual PC Console

Posted on 2007-04-08
3
687 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
  • 2
3 Comments
 
LVL 7

Expert Comment

by:avatar-e
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now