Fix compile script, update VM tools, Vagrant -> 2.0.3
This commit is contained in:
@@ -3,13 +3,15 @@
|
||||
|
||||
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto 64BIT
|
||||
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue > NUL
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems > NUL
|
||||
|
||||
exit /b
|
||||
exit 0
|
||||
|
||||
:64BIT
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue
|
||||
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems
|
||||
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe executequeueditems
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue > NUL
|
||||
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue > NUL
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems > NUL
|
||||
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe executequeueditems > NUL
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
Try {
|
||||
Write-Output "Set power plan to high performance"
|
||||
|
||||
$HighPerf = powercfg -l | %{if($_.contains("High performance")) {$_.split()[3]}}
|
||||
|
||||
# $HighPerf cannot be $null, we try activate this power profile with powercfg
|
||||
#
|
||||
if ($HighPerf -eq $null)
|
||||
{
|
||||
throw "Error: HighPerf is null"
|
||||
}
|
||||
|
||||
$CurrPlan = $(powercfg -getactivescheme).split()[3]
|
||||
|
||||
if ($CurrPlan -ne $HighPerf) {powercfg -setactive $HighPerf}
|
||||
|
||||
} Catch {
|
||||
Write-Warning -Message "Unable to set power plan to high performance"
|
||||
Write-Warning $Error[0]
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ComputerName>vagrant-2012</ComputerName>
|
||||
<ComputerName>vagrant-2016</ComputerName>
|
||||
<CopyProfile>false</CopyProfile>
|
||||
</component>
|
||||
</settings>
|
||||
|
||||
@@ -15,7 +15,7 @@ if exist "C:\Users\vagrant\windows.iso" (
|
||||
)
|
||||
|
||||
if not exist "C:\Windows\Temp\windows.iso" (
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.5.7/5813279/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/14.1.1/7528167/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
|
||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
|
||||
FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
|
||||
rd /S /Q "C:\Program Files (x86)\VMWare"
|
||||
@@ -31,16 +31,12 @@ goto :done
|
||||
|
||||
:virtualbox
|
||||
|
||||
:: There needs to be Oracle CA (Certificate Authority) certificates installed in order
|
||||
:: to prevent user intervention popups which will undermine a silent installation.
|
||||
cmd /c certutil -addstore -f "TrustedPublisher" A:\oracle-cert.cer
|
||||
|
||||
if exist "C:\Users\vagrant\VBoxGuestAdditions.iso" (
|
||||
move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
|
||||
)
|
||||
|
||||
if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.1.28/VBoxGuestAdditions_5.1.28.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.2.4/VBoxGuestAdditions_5.2.4.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
|
||||
)
|
||||
|
||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
"winrm_password": "vagrant",
|
||||
"winrm_timeout": "4h",
|
||||
"shutdown_command": "a:/sysprep.bat",
|
||||
"guest_os_type": "Windows2012_64",
|
||||
"guest_os_type": "Windows2016_64",
|
||||
"guest_additions_mode": "disable",
|
||||
"disk_size": 61440,
|
||||
"floppy_files": [
|
||||
|
||||
Reference in New Issue
Block a user