Created
August 3, 2017 14:24
-
-
Save ogero/22e974514c4e613958781302a7385e5e to your computer and use it in GitHub Desktop.
Toggle Hyper-V util (docker vs avd-haxm)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:InputToggle | |
echo Select hypervisor launch tipe (auto/off):(A/O) | |
set INPUT= | |
set /P INPUT=Type input: %=% | |
If /I "%INPUT%"=="a" goto auto | |
If /I "%INPUT%"=="o" goto off | |
echo Incorrect input & goto InputToggle | |
:auto | |
bcdedit /set hypervisorlaunchtype auto | |
goto InputReboot | |
:off | |
bcdedit /set hypervisorlaunchtype off | |
goto InputReboot | |
:InputReboot | |
echo Do you want to reboot now?(Y/N) | |
set INPUT= | |
set /P INPUT=Type input: %=% | |
If /I "%INPUT%"=="y" goto rebootyes | |
If /I "%INPUT%"=="n" goto rebootno | |
echo Incorrect input & goto InputReboot | |
:rebootyes | |
echo Done. Rebooting now to apply changes. | |
shutdown.exe /r /t 08 | |
goto end | |
:rebootno | |
echo Done. Reboot manually to apply changes. | |
goto end | |
:end | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment