Question

Is there a way to detect the exist status of WebPICmd.exe (Command line version of WebPlatformInstaller), so that I can use it in my script.

I need to know if installation of particular product succeeded or not. (Trying to install PHP53, which seems to fail randomly due to download failures)

Was it helpful?

Solution

This can be detected using $LASTEXITCODE variable in PowerShell.

In dos mode it should be LASTERRORLEVEL.

Remember to check this variable immediately after running the WebPICmd.exe so that it's return code is not overwritten by something else down the line.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top