Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Toggle Hyper-V util (docker vs avd-haxm)
@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