set "URL=https://jenkins.openvm.eu/files/windows/CloudStackWindowsGuestAgent.zip" set "TMPD=%TEMP%\CloudStackWindowsGuestAgent" set "DEST=%ProgramData%\CloudStackWindowsGuestAgent" mkdir "%TMPD%" 2>nul curl.exe -fsSL -o "%TMPD%\CloudStackWindowsGuestAgent.zip" "%URL%" || echo DOWNLOAD FAILED certutil -hashfile "%TMPD%\CloudStackWindowsGuestAgent.zip" SHA256 tar.exe -xf "%TMPD%\CloudStackWindowsGuestAgent.zip" -C "%TMPD%" powershell -NoProfile -ExecutionPolicy Bypass -File "%TMPD%\CloudStackWindowsGuestAgent.ps1" -Install -EnableSshd -SerialLog copy /Y "%TMPD%\unattend.xml" "%DEST%\unattend.xml" notepad "%DEST%\unattend.xml"