Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Error handling in Installascript


1 reply to this topic

smitakelkar

smitakelkar
  • Members
  • 9 posts

Posted 24 February 2003 - 06:23

How can i use error handling in Installscript?
E.g I use a statement such as

result = oSQLServer.Connect

This statement gives HRESULT .Basically if this statement fails, the control does not return to the installscript instead the installshield setup directly shows 'Installshield Wizard Interrupted' dialog box and aborts the setup.
In such a situation,i can not display any custom message box to user displaying proper message about why the setup failed.

Same thing happens when i am calling methods of objects such as  COM objects or ADO.
Can anyone help?

Thanks!
Smita Kelkar

Dagostini

Dagostini
  • Members
  • 13 posts

Posted 22 April 2003 - 19:17

Try (pun intended) using try and catch statements.

i.e.
try
result = oSQLServer.Connect;

catch
MessageBox(Err,INFORMATION);
return ERROR_INSTALL_FAILURE;
endcatch;
return ERROR_SUCCESS;