I am in need of creating a list of running & non-running virtual machines. I am in search of a C++ solution, but a command line would do just fine.
This one, for instance,
vmrun -T ws list
lists all running VMs, but not turned off ones.
The vmrun utility does not have the capability to list VM's that are not running.
Your options are to parse the various files that VMware Workstation stores VM information that it knows about and or search the file system for .vmx configuration files. Although the latter does not necessarily mean it a complete and or functioning VM. I guess it really depends on the total scope of the goal how much coding will need to be done.
Wow, I already knew that however I was hoping you'd expound on it! I'm assuming, since you said "I am in search of a C++ solution", you're a programmer and as such you can just as easily as I review the VIX API Documentation, specifically the VIX API Reference Function Support Matrix at VMware's website. I did take a quick look and saw nothing relevant however if you're doing the programming then I'd suggest you review it too.
Without knowing more then you said so far, I'll just have to say that my first reply covers it.