This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to trap an automation error
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 20, 2008
01:50 PM
How to trap an automation error
Afternoon everyone,
Here's the deal:
We use IS automation to build our merger modules and .msi's.
We make this happen via a VB script.
IE: MakeInstall,vbs
And it is absently wonderful.
From time to time however, errors occur when adding new components to our merge modules.
"ISWiProject.AddComponent".
One issue I'm working on:
If for any reason when adding a new component to a MM, a failure occurs, IS2K9 displays the "Invalid Identifier was supplied" dialog and sits there until someone clicks on the "OK" button.
Then of course when the "OK" button is clicked our script falls through to the next step which is to build the MM (sans the component that failed during the attempt to add it.)
Is there some way to NOT have the "Invalid Identifier was supplied" dialog (or any other dialog for that matter) appear if an error occurs during the mm update ?
(ISWiProject.AddComponent)
And then, would there be a way to check for a status which would allow my VB script to branch appropriately ?
Thanks in advance for any response.
Ray in Wisconsin
I would like to learn of a way to trap anything other than a sucessfull "Add of a component" so that I might END the automated procedure at that point.
I tried some basic error trapping:
IE:
if err.number <> 0 then Display some sort of message.
But this error checking occurs AFTER the ISWiProject.AddCoponent is executed.
I would like to know id there is a way to monitor when the iswi.AddComponent fails so that I may end out automated procedure at that point.
Currently, if the merge module update procedure fails, our scripts just contiues on with the next step.
WHich is to build the merge modules.
Here's the deal:
We use IS automation to build our merger modules and .msi's.
We make this happen via a VB script.
IE: MakeInstall,vbs
And it is absently wonderful.
From time to time however, errors occur when adding new components to our merge modules.
"ISWiProject.AddComponent".
One issue I'm working on:
If for any reason when adding a new component to a MM, a failure occurs, IS2K9 displays the "Invalid Identifier was supplied" dialog and sits there until someone clicks on the "OK" button.
Then of course when the "OK" button is clicked our script falls through to the next step which is to build the MM (sans the component that failed during the attempt to add it.)
Is there some way to NOT have the "Invalid Identifier was supplied" dialog (or any other dialog for that matter) appear if an error occurs during the mm update ?
(ISWiProject.AddComponent)
And then, would there be a way to check for a status which would allow my VB script to branch appropriately ?
Thanks in advance for any response.
Ray in Wisconsin
I would like to learn of a way to trap anything other than a sucessfull "Add of a component" so that I might END the automated procedure at that point.
I tried some basic error trapping:
IE:
if err.number <> 0 then Display some sort of message.
But this error checking occurs AFTER the ISWiProject.AddCoponent is executed.
I would like to know id there is a way to monitor when the iswi.AddComponent fails so that I may end out automated procedure at that point.
Currently, if the merge module update procedure fails, our scripts just contiues on with the next step.
WHich is to build the merge modules.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2008
04:21 PM
I haven't looked into this recently, and I'm very much not a VBS expert, but I think this is a limitation of VBS. Using full VB you can set flags like "On Error Goto Handler", or in VB.NET or at last C# you can use try/catch blocks, and in either case do any error handling you prefer. In VBS I believe it catches all exceptions for you, and displays them as a message box.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2008
08:18 PM
vbscript only supports 'on error resume next'
Eitherway, seriously, don't use vbscript for your build automation. Break out VB.NET or C# and write your build automation using MSBuild tasks. If you don't have/can't afford visual studio, get a copy of Sharp Develop.
If you don't know .NET yet, it's time to learn it. 🙂
Eitherway, seriously, don't use vbscript for your build automation. Break out VB.NET or C# and write your build automation using MSBuild tasks. If you don't have/can't afford visual studio, get a copy of Sharp Develop.
If you don't know .NET yet, it's time to learn it. 🙂