Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
greenmtnit
Lurker
Posts: 2
Liked: never
Joined: Apr 01, 2020 4:31 pm
Contact:

Reading Result Codes from Unattended Install

Post by greenmtnit »

I am testing unattended install of the Veeam Agent for Windows using this link:
https://helpcenter.veeam.com/docs/agent ... tml?ver=40
The article mentions various exit codes for the installer, but I can't seem to find where to access these codes.
I've already tried %ERRORLEVEL% but that doesn't seem right. How can I read the result codes of the unattended installer?
HannesK
Product Manager
Posts: 14314
Liked: 2889 times
Joined: Sep 01, 2014 11:46 am
Full Name: Hannes Kasparick
Location: Austria
Contact:

Re: Reading Result Codes from Unattended Install

Post by HannesK » 1 person likes this post

Hello,
actually I'm not an expert for CMD and I could not find anything useful on the internet for getting output to %ERRORLEVEL%. But I found a powershell script that gives the exist code as expected

adopted from https://stackoverflow.com/questions/102 ... ad-of-wait

Code: Select all

$proc = Start-Process -FilePath "VeeamAgentWindows_4.0.0.1811.exe"  -ArgumentList "/silent /accepteula /acceptthirdpartylicenses" -PassThru
$handle = $proc.Handle # cache proc.Handle
$proc.WaitForExit();
Write-Host "exit code $($proc.ExitCode)"
does that help?

Best regards,
Hannes
greenmtnit
Lurker
Posts: 2
Liked: never
Joined: Apr 01, 2020 4:31 pm
Contact:

Re: Reading Result Codes from Unattended Install

Post by greenmtnit »

Thanks for the reply and the code. I will test it! Thanks again.
Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests