2

I am using portqry v2 into a batch file and when I catch the stderr from the .exe file, the code is 99. I know what does 1,2 and 3 code means, but 99 I have no idea... I was googleling it for a while but it seems that I am the only one with that issue.....

Could you help me please ?

thanks in advance

npocmaka
  • 55,367
  • 18
  • 148
  • 187

1 Answers1

1

Microsoft often has not good documented the exit codes respectively return values assigned to errorlevel variable for their console applications like PortQry version 2.0. Also Microsoft's Portqry Remarks TechNet article explains only the errorlevels 0, 1 and 2.

But take a look on Can I auto-install or deploy Splunk onto all my remote Windows servers? A user posted there a large batch file with the lines:

IF %ERRORLEVEL% == 99 goto CantResolve

:CantResolve
cls
echo Unable to resolve the Splunk DNS addresses (%DNSLOCATION%).
echo Please verify that the DNS settings are correct

It looks like exit code 99 means the IP address for the specified domain name cannot be resolved by DNS.

Mofi
  • 46,139
  • 17
  • 80
  • 143
  • Thanks so much ,you made my day.That is a good answer with a really nice example, I own you a beer, I still don´t be able to mark that answer as usefull but i will do as soon as possible. have a nice day – user3506466 Aug 01 '14 at 06:44