dogi / ole--vagrant-community

0 stars 19 forks source link

First step of install.bat creation #34

Closed FanisGk closed 7 years ago

FanisGk commented 7 years ago

I wrote the 'Virtualization check' part, which is a powershell script imported into a batch file. The powershell script is the following:

$a = (Get-CimInstance -ClassName win32_processor -Property Name, SecondLevelAddressTranslationExtensions, VirtualizationFirmwareEnabled, VMMonitorModeExtensions)
$a | Format-List Name, SecondLevelAddressTranslationExtensions, VirtualizationFirmwareEnabled, VMMonitorModeExtensions
$slat = $a.SecondLevelAddressTranslationExtensions
$virtual = $a.VirtualizationFirmwareEnabled
$vmextensions = $a.VMMonitorModeExtensions
If ($slat -eq $false)
{
    "BeLL-Apps is not compatible with your system. In order to install it, you need to upgrade your CPU first."
    exit
}
Else
{
    If ($virtual -eq $false)
    {
        "Virtualization is not enabled. In order to install BeLL-Apps, you must enable it. Helpful link: http://www.howtogeek.com/213795/how-to-enable-intel-vt-x-in-your-computers-bios-or-uefi-firmware/"
        exit
    }
}

I wasn't sure if I should add a check about VMMonitorModeExtensions though.