Hi all,
Is there a way of mimicking the VB6 resume statement within Installscript?
Basically I want to retry execution of failed statement/function.
Using an Installscript custom action - Basic MSI Installshield project.
Regards,
Christoph.
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.
Error Handling - Resume
Started by
Christoph
, Mar 15 2007 11:53
1 reply to this topic
Posted 19 March 2007 - 20:22
Hi Christoph,
InstallScript has a construct called "labels". You can use them to jump to a certain point in the script. One of our apps requires that all MS Internet Explorer windows be closed before installation could start. Below is real fragment of code that I use to check if MSIE is running:
InstallScript has a construct called "labels". You can use them to jump to a certain point in the script. One of our apps requires that all MS Internet Explorer windows be closed before installation could start. Below is real fragment of code that I use to check if MSIE is running:
CODE |
CheckIEProcess: //Check if MSIE process is currently running nHwnd = FindWindow("IEFrame", ""); if (nHwnd = NULL) then nResult = 0; else nResult = 1; endif; if (nResult = 1) then bvCheck1 = TRUE; bvCheck2 = FALSE; AskOptions(EXCLUSIVE, @ISSTRING_CLOSE_MSIE, @ISSTRING_TRY_AGAIN, bvCheck1, @ISSTRING_ABORT_SETUP, bvCheck2); if (bvCheck1) then //Try Again clicked Delay(2); goto CheckIEProcess; elseif (bvCheck2) then //Abort Setup clicked Do(EXIT); endif; endif; |
CheckIEProcess: above is a label. It should start from the begining of the line and end with semicolon.
AskOptions displays a dialog asking user to close MSIE and click `Try Again` button, or click `Cancel` to abort the installation.
goto CheckIEProcess; - jumps back to CheckIEProcess: label if any MSIE windows are still running.
Regards,
RUS ULANOFF
RUS ULANOFF