Is there a way (API/Scripting) to work with Virtual PC?

流过昼夜 提交于 2019-12-11 07:08:01

问题


Is there a way to interact with Virtual PC1?

Looking to do basic things like startup and shutdown (with choice of save or turn off etc..) specific VM's.

Any solution other than simulating key presses would be fine, for example

  • WMI
  • COM+
  • ADSI
  • PowerShell

1 - Specifically for Virtual PC as in Microsoft Virtual PC (i.e. the one that runs on Vista and earlier), not Windows Virtual PC (i.e. the Win7 one)


回答1:


Alas, no, see http://www.aspdeveloper.net/Virtual_PC/rn-739-16434_Virtual_PC_API.aspx .




回答2:


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]



来源:https://stackoverflow.com/questions/892978/is-there-a-way-api-scripting-to-work-with-virtual-pc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!