PDA

View Full Version : Automation error



Barbara
01-05-2006, 07:51 AM
I am using a build tool written in C# to build my InstallShield Projects. Among other things, the IS project is opend and the ProductName ist written to the release.
This is the code which works with the IS X automation interface, using it with IS 11.5 throws me an exception:


ISWiAuto1150.ISWiProject ISWiProject;
ISWiProject = new ISWiAuto1150.ISWiProject();

strConfigsProductName = strProductName + " Setup-Build " + strHotfix;
try
{
ISWiProject.ISWiProductConfigs[strConfigName].set_ProductName(ref strConfigsProductName);
}
catch (Exception ex)
{
MessageBox.Show("Error writing to ISM Project " + ex.Message.ToString(), strMessageBoxCaption);
}

The exception thrown is:
Item Not Found, ISWiAutomation.ISWiProductConfigs.Item

Whats wrong with the code ? Was it a bug in IS X that it was working or is it a bug in IS 11.5 that it is not working ?

Thank you
Barbara

dealkema
01-05-2006, 08:43 AM
Is this all of the code? I didn't see a call to OpenProject().

Barbara
01-05-2006, 02:45 PM
This is not all the code. Of course I called OpenProject(). I just wanted to post the code snippet where the exception is thrown. If you need the other parts of the code, I can post it too.

Barbara

Jonny_B
01-06-2006, 01:13 PM
Why don't you use the VBScriipt that is provided?

Barbara
01-09-2006, 03:49 AM
WhichVBScript is provided ? I am using a build tool completely programmed in C# which does several things (check out the project vom VSS, make some changes in the project and then build the project). For some purposes I am using the InstallShield Automation interface, my question is:
Why is the code that was working with the IS X - interface not working with the IS 11.5 interface ? What changes have been made on the programming interface ? I would except that some Macrovision people couls give me the answer.

Barbara
01-09-2006, 06:24 AM
Found the solution: I made a typo in the Releasename, its case sensitive. I wrote a small letter instead of a capital. This caused the exception.

Barbara