I have a little bit solve my problem. I use install script, and call LaunchAppAndWait function.
And i check its return value, in the help documents it says it returns <0 when the app was not launched successfully, and returns 1 means app was launched successfully.
I need to run osql.exe with some sql scripts, application launches successfully and creates databases on the server and LaunchAppAndWait returns zero. I displayed its return value in a message box, and it was zero and i couldn't understand why it returns zero.
But my main question is LaunchAppAndWait controls window handle of the application. I need to check if application's return value (in my case, osql.exe's)
Although application creates window but doesn't create databases due to some error (for example script file is missing) LaunchAppAndWait returns zero, same as above.
When I use InstallShields CustomActionWizard, returns internal failures when above error (missing script file) occurs.
I do not care if my application creates window or not, i do want to know that it successfully creates the database or there was an error. How can I do this?
Thanks,
Metin SENKAL