Adding some small fixes
This commit is contained in:
@@ -14,6 +14,9 @@ if ($env:PACKER_BUILDER_TYPE -And $($env:PACKER_BUILDER_TYPE).startsWith("hyperv
|
||||
#. $env:TEMP\Debloat-Windows-10-master\scripts\block-telemetry.ps1
|
||||
#Write-Host Disable services
|
||||
#. $env:TEMP\Debloat-Windows-10-master\scripts\disable-services.ps1
|
||||
Write-host Disable Windows Defender
|
||||
#. $env:TEMP\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1
|
||||
Uninstall-WindowsFeature Windows-Defender-Features
|
||||
Write-host Optimize Windows Update
|
||||
. $env:TEMP\Debloat-Windows-10-master\scripts\optimize-windows-update.ps1
|
||||
#Write-host Disable Windows Update
|
||||
|
||||
@@ -18,7 +18,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/14.1.1/7528167/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.2/8497320/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"
|
||||
@@ -27,6 +27,11 @@ if not exist "C:\Windows\Temp\windows.iso" (
|
||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare"
|
||||
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"
|
||||
|
||||
sc query vmtools > NUL
|
||||
IF ERRORLEVEL 1060 cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"
|
||||
sc query vmtools > NUL
|
||||
IF ERRORLEVEL 1060 ECHO "Unable to install VMware Tools." & exit /b 1
|
||||
|
||||
rd /Q "C:\Windows\Temp\vmware-tools.tar"
|
||||
rd /Q "C:\Windows\Temp\windows.iso"
|
||||
rd /S /Q "C:\Windows\Temp\VMware"
|
||||
|
||||
Reference in New Issue
Block a user