sonda
Posts: 101
Joined: Mon Apr 30, 2018 12:01 pm

Run cmd or bat and read/use output

I want to call cmd or bat file and i want to read output from the output to continue or to stop installation. i have read this https://www.advancedinstaller.com/user- ... -file.html, but not sure how to read output, also how to close some exe file if i have lunched during the instalation?

Thanks
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Run cmd or bat and read/use output

Hello,

You can achieve this by controlling the exit code of your BAT file. Just create a BAT file which exits a return code different than 0 (zero). Windows Installer service checks the custom action exit code at install time. Any exit code different than 0 is interpreted as a failure and in this case it will stop the installation.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”