Вопрос

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)

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top