PDA

View Full Version : MSI & EXE projects InstallShelid automation using Powershell script failing in 2018



dpothugunta5208
08-18-2018, 07:19 AM
$designerProject = New-Object -ComObject "ISWiAuto24.ISWiProject"
$ismFilepath = "$scriptPath\Designer.ism"
$designerProject.OpenProject($ismFilepath)


I had no issues with the 2016. same code was working fine but after upgrading to 2018 getting the below error.

(this is partial error list).

New-Object : Retrieving the COM class factory for component with CLSID {520F427A-A0C0-48DA-B1D6-5AD84FEFD1A8} failed due to the following error:
80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
At D:\Murty Build Testing\ToolkitDesignerMSI\BuildToolkitOneDesingerMSI.ps1:78 char:24
+ ... $designerProject = New-Object -ComObject "ISWiAuto24.ISWiProject"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: ( [New-Object], COMException
+ FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand

Jenifer
08-27-2018, 06:24 AM
$designerProject = New-Object -ComObject "ISWiAuto24.ISWiProject"
$ismFilepath = "$scriptPath\Designer.ism"
$designerProject.OpenProject($ismFilepath)


I had no issues with the 2016. same code was working fine but after upgrading to 2018 getting the below error.

(this is partial error list).

New-Object : Retrieving the COM class factory for component with CLSID {520F427A-A0C0-48DA-B1D6-5AD84FEFD1A8} failed due to the following error:
80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
At D:\Murty Build Testing\ToolkitDesignerMSI\BuildToolkitOneDesingerMSI.ps1:78 char:24
+ ... $designerProject = New-Object -ComObject "ISWiAuto24.ISWiProject"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: ( [New-Object], COMException
+ FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand

Hi dpothugunta5208,

The error seems to be issue with COM component registration which is bit weird.Can you please elaborate bit more?

-IS2016->IS2018 migration you did?
-Is it failing with all other ways of automation i.e vbscript?
-Is it project specific?-What project type are you using?


Thanks,
Jenifer

rrajeshkumar
12-13-2018, 06:21 AM
Hi,

I am currently working on the licensed InstallShield 2018 and facing an issue i.e: ActiveX component can't create object: 'IswiAuto21.ISWiProject'.

Below are the VB Script, which tries to create the Activex components:

Set m_ISWIProject = CreateObject("IswiAuto21.ISWiProject")
m_ISWIProject.OpenProject(WScript.Arguments(0))
m_ISWIProject.ProductName = WScript.Arguments(1)
m_ISWIProject.SaveProject()
m_ISWIProject.CloseProject()
m_ISWIProject = ""


And but it failing when call the script like below:
"c:\Windows\SysWOW64\cscript" //nologo Release.vbs


The VB Script throwing the error, can you please let me know what is the issue and how to resolve it?


Environment used:

OS: Windows 10 x64
Install Shield: 2018 R2 version

banna_k
12-13-2018, 10:58 PM
Whatever the progID ("IswiAuto21.ISWiProject") you are using to create object is not specific to InstallShield 2018.
Can you try to create the object with "IswiAuto24.ISWiProject".