Hi group, I am a little new to Kix.

The script below runs a setup.exe according to the settings in the .iss file, and once completed needs to delete the test.ini file which is created as part of the setup.

The problem is that the setup routine has not completed by the time the script tries to delete the file which then fails as it is not there.

I have kludged it with the SLEEP commend, but how can I test that the setup has completed before going on to the next stage?

Thanks for help
Steve

;Tests for presence of existing installation
$wfc = EXIST ("C:\test.ini")
IF $wfc=1

MESSAGEBOX("Already installed - Contact Administrator", "Test Deployment",0)
EXIT
ELSE
SHELL "I:\disk1\setup -s"
SLEEP 20
DEL "C:\test.ini"
MESSAGEBOX ("Installation Completed", "Test Deployment",0)
ENDIF