Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
How to read the VM configuration file (VMCX) using WMI C++.
Something similar to Editing a .VMCX file | Ben Armstrong’s Virtualization Blog[^]


Most of the documents i find are in c# or powershell.
Is there something similar in C++ where i can use object.GetRelated () association ?

Thanks in advance.

What I have tried:

Tried with powershell script (as mentioned in the above doc) or using the compare-vm command. Not able to get the association in C++.
Posted
Updated 15-May-18 5:45am

1 solution

I see these possible solutions:

a) you could be to write a small console app in c# which parses the file and write the data in a text file for your C++ code.
b) you parse the vmcx-file with some xml-parser in C++.
c) write some string search in C++ (a bit hacky)
d) advanced: use C# in C++
e) advanced use powershell in C++

The correct way would be e). If you do it, please write your results a article. I think, that a) would be the easiest way and c) a bit nasty.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900