Created
September 12, 2017 16:19
-
-
Save briancain/aff12e36a13bef2bb93f1d03ef973e66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if not exist "C:\Windows\Temp\7z920-x64.msi" ( | |
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL | |
) | |
msiexec /qb /i C:\Windows\Temp\7z920-x64.msi | |
if exist "C:\Users\vagrant\windows.iso" ( | |
move /Y C:\Users\vagrant\windows.iso C:\Windows\Temp | |
) | |
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.5/5234757/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" | |
) | |
cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare" | |
start /wait C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\" | |
del /Q "C:\Windows\Temp\vmware-tools.tar" | |
del /Q "C:\Windows\Temp\windows.iso" | |
::rd /S /Q "C:\Windows\Temp\VMware" | |
goto :done | |
:done | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment