mhorowitz
Posts: 12
Joined: Sat Jul 26, 2008 7:11 am

command line build completes after command returns

I am trying to set up a build using the AdvancedInstaller.exe /build ... command as a part of a script. It appears that this command starts the build, but exits more or less immediately and does not wait for it to complete.

If I run the build command at the command line and run dir *immediately* after, the length of the msi is too short (once, even zero bytes). If I run dir again, it has the right size. So far, my scripts have managed to trip over an incomplete msi file, but I am concerned. Is there a bug here?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: command line build completes after command returns

Hi,

Please note that the command line feature is offered through the "AdvancedInstaller.com" file. Let me know if the problem persists when using this file instead of "AdvancedInstaller.exe".

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mhorowitz
Posts: 12
Joined: Sat Jul 26, 2008 7:11 am

Re: command line build completes after command returns

Oh, that's much better. Status output, too! I guess I didn't pay close enough attention to the docs, and since it more or less worked, I didn't realize it was my fault. Thanks!
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: command line build completes after command returns

Hello mhorowitz,
mhorowitz wrote:I am trying to set up a build using the AdvancedInstaller.exe /build ... command as a part of a script. It appears that this command starts the build, but exits more or less immediately and does not wait for it to complete.
to make cmd.exe wait for (some, esp. GUI) apps to quit use...

Code: Select all

start /wait myprogram.exe 
In case of AI using the *.com executable is the better way of course.

To avoid this misunderstanding AdvancedInstaller.exe could check wether it has valid std streams. If so it could simply output "Use AdvancedInstaller.com instead!" or so and quit with an error code != 0.



With best regards

Clemens Anhuth
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: command line build completes after command returns

canhuth wrote:To avoid this misunderstanding AdvancedInstaller.exe could check wether it has valid std streams. If so it could simply output "Use AdvancedInstaller.com instead!" or so and quit with an error code != 0.
Ah, started in the background it doesn't have the std streams of cmd.exe anyway, so nevermind this last part.


With best regards

Clemens Anhuth

Return to “Common Problems”