w10install/optional/install-virtualbox.cmd

40 lines
1.1 KiB
Batchfile
Raw Normal View History

2021-02-03 13:37:54 +01:00
@echo off
2021-02-27 20:07:28 +01:00
set EXE=..\software\virtualbox-setup.exe
2021-09-05 15:02:23 +02:00
set VBOXMANAGE="%ProgramFiles%\Oracle\VirtualBox\VBoxManage.exe"
set STARTMENU=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs"
2021-02-27 20:07:28 +01:00
if NOT EXIST %EXE% (
echo ERROR: %EXE% not found!
exit /b
)
2021-02-03 13:37:54 +01:00
echo ####### %0 #######
echo installing VirtualBox ...
%EXE% --silent --ignore-reboot
echo renaming Desktop shortcut ...
move /Y "%PUBLIC%\Desktop\Oracle VM VirtualBox.lnk" ^
"%PUBLIC%\Desktop\VirtualBox.lnk"
rem refresh desktop (W10 style)
ie4uinit.exe -show
echo disabling VirtualBox update search ...
%VBOXMANAGE% setextradata global GUI/UpdateDate never
2021-09-05 15:02:23 +02:00
echo moving VirtualBox startmenu shortcut ...
move /Y %STARTMENU%\"Oracle VM VirtualBox\Oracle VM VirtualBox.lnk" %STARTMENU%
echo removing VirtualBox startmenu folder ...
rd /S /Q %STARTMENU%\"Oracle VM VirtualBox" 2>nul
echo disabling VirtualBox bridging protocol ...
powershell -Command "Disable-NetAdapterBinding -Name '*' -ComponentID oracle_VBoxNetLwf"
powershell -Command "Get-NetAdapterBinding -ComponentID oracle_VBoxNetLwf"
2021-02-03 13:37:54 +01:00
echo ####### %0 #######
2021-03-02 21:47:42 +01:00
pause