ISWiRelease Throwing COM Exception in Install Shield Automation

0

Iam trying to create an Automation in Install Shield, But Whenever I try to create object of ISWiRelease it throws following exception.

Additional information: Retrieving the COM class factory for component with CLSID {16C4628B-361F-4739-8D75-4E8FA8C4A348} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

I tried changing target platform to x86,Still Iam getting this exception. Iam using Install Shield 2015 SP2.

DLL which I loaded is ISWiAuto22

Please help me to fix this issue.

Code:

 public void BuildProject()
        {
            ISWiProductConfigs oProdConfigs;
            ISWiProductConfig oProdConfig;
            ISWiRelease oRelease = new ISWiRelease();
            ISWiProject oISWiProj = new ISWiProject();
            try
            {

                //Create IS object
                oISWiProj.OpenProject(sProjectFileName, false);
                //oISWiProj.ProductVersion = sBuildNumber;

                oProdConfigs = oISWiProj.ISWiProductConfigs;
                oProdConfig = oProdConfigs[oProdConfigs.Count];


                oRelease = oProdConfig.ISWiReleases[1];

                oRelease.ProgressIncrement += new __ISWiRelease_ProgressIncrementEventHandler(release_ProgressIncrement);
                oRelease.StatusMessage += new __ISWiRelease_StatusMessageEventHandler(this.release_StatusMessages);

                oRelease.BuildLocation = sBuildLocation;
                oRelease.Build();

                oISWiProj.SaveProject();

                oISWiProj.CloseProject();
            }
            catch
            {
                //log("Build Failed...");
            }
            finally
            {
                oRelease.ProgressIncrement -= new __ISWiRelease_ProgressIncrementEventHandler(release_ProgressIncrement);
                oRelease.StatusMessage -= new __ISWiRelease_StatusMessageEventHandler(this.release_StatusMessages);
            }
        }
c#
installshield-2015
asked on Stack Overflow Jun 14, 2018 by Justin CI

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0