notsohuman 0 Newbie Poster

Hello,

Currently I am trying to make Windows Hyper-V and Virtual-Box coexist in the same machine, normally only one hypervisor should be running at any given time but Hyper-V runs all the time. I did some Googling and found this solution (http://derekgusoff.wordpress.com/2012/09/05/run-hyper-v-and-virtualbox-on-the-same-machine/). It works just fine, however I would like to automate the process of toggling the hypervisorlaunchtype from off to auto automalically through a batch script.

Here is some sudo-code of what I would like to do:

if (hypervisorlaunchtype == auto){
    bcdedit /set hypervisorlaunchtype off
} else {
    bcdedit /set hypervisorlaunchtype auto
}

I have done some Googling on how to write such script but haven't been able to find something that does what I want. Any help would be appreciated.