开发者

How do I get the Virtual Machines folder on Win7?

I'm writing a tool called XP-More, which should help manage Windows 7 Virtual Machines. The first thing the tool has to do when launched is find the VM folder. However, turns out that folder is not listed as a Windows Special Folder. I use a workaround, but it's unreliable. Ideally,

Environment.GetFolderPath(Environment.SpecialFolder.VMFolder)

or so would 开发者_JAVA技巧have done the job, but VMFolder is a fiction of my imagination. Is there any real way to get that folder?


I found this. You can either get the default folder, or search for the 'myvirtualmachines' environment variable.


@m0sa - your solution works for Microsoft Virtual PC, but Windows 7 comes with a variant called Windows Virtual PC, which seems to be slightly different. On my Windows 7, for instance, there's neither myvirtualmachines environment variable nor any other one pointing to the actual folder.

(sorry for writing this as an answer. I know it sucks, but I can't add comments at this point)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜