up vote 2 down vote favorite
share [g+] share [fb]

Does Microsoft Virtual PC have any scripting capabilities? I'm trying to automatically launch a web browser inside the VM and have it go to url specified by a parameter.

link|improve this question

feedback

2 Answers

MSDN Article reference.

the Virtual PC product is a very close cousin to Virtual Server. Both share the same basic code base, however, you can automate Virtual Server but you cannot directly automate Virtual PC.

That article goes on to describe how to automate the Virtual Server.


Stackoverflow question: Is there a way (API/Scripting) to work with Virtual PC?
The Virtual PC guy's blog may be a good read.

link|improve this answer
feedback

It's not quite what you're after but there are a whole set of command line parameters you can use on Virtual PC.exe to start and pause VMs as well as set screen modes and disable/enable various options.

You can find them on this MS KB 831501 article.

"Virtual PC.exe" [-singlepc] [-quiet] [-usehostdiskcache] [-pc virtual_machine_name [-disableclose] [-disableopt] [-s3bitclip] [-setbiosno bios_serial_number] [-setassettag asset_tag] [-extnetworking] [-launch] [{-fullscreen|-window}] [-geometry widthxheight{+|-}x offset{+|-}y offset] [{-minimize|-restore}] [{-pause|-resume}]] [-help] [-registervm filename.vmc] [-startvm filename.vmc]

If you just wanted to start one specific URL, you could simply set a web browser to start and set it going to that one specific URL simply by putting the shortcut in the Startup folder inside the VM, or setting the home page.

Your problem where you want to be able to specify an arbitrary web page from outside the VM and then have that start inside the VM when it starts isn't quite so easy.

I'd have thought the easiest way to do this is to think how you'd do this with a physical PC. You could redirect the Startup folder (or entire profile) for the ID used in the VM to a network folder, you could then just create/edit a shortcut in its Startup folder before opening the VM, or you could set it to run a logon script that can be changed from outside the VM.

Or you could use something like WMI/WSH scripting from outside the VM to detect when the VM's switched on and logged in, then launch and control IE that way.

link|improve this answer
WMI and WSH are much better solutions if the host (or other computers) can actually talk to the VM solutions. – Goyuix Dec 24 '09 at 3:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.