Programatically detect if I'm in VirtualBox seamless mode
Is there a way to detect whether I'm in VirtualBox's seamless mode from a guest m开发者_StackOverflow中文版achine? Or is there any command line option from VBoxControl.exe to detect this that I'm not seeing?
If that can't happen, can I programatically detect if a guest is in seamless mode from the host?
There are several ways;
- check what API access you have to the information reported by the device manager; if you are on a VBox guest, you'll find a couple of unusual devices (VBOX CD-ROM, VirtualBox Graphics Adapter, VBOX HARDDISK, VirtualBox system device). Already the PC's hostname is "VIRTUALBOX".
- Another, quite similar source of information is the systeminfo command. Also there, several specific parameters would contain names or values defined by VBox
- You could also check if VBox additions are installed; they leave trace in the program directory, in the registry
reg:\HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox Guest Additions
and as a running task in the task manager.
精彩评论