cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Roman1
Level 9

IS Automation And PowerShell

Hello,
I am trying to write an PowerShell automation wrapper for IS2013. On this PC IS2013 is installed and is used to build all setups.

The first error I see is:

===================
New-Object : COM-Class factory for Component CLSID {52BA76F5-D0A7-4F2E-BD4A-45F8F2CE6A55} can not be called
Error: 80040154 class not registered (exception HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG)).
+ $m_ISWiProj = New-Object -com ISWiAuto20.ISWiProject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
+ FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
===================

Below the whole ps1 script. Does anybody know, what wrong is here?

$m_ISWiProj = New-Object -com ISWiAuto20.ISWiProject
$strFile = "C:\\devX11-Installations\\test-MSI-Leer2\\test-MSI-Leer2.ism"

$m_ISWiProj.OpenProject($strFile)

$strProject = ""

ForEach ($m_Feature In $m_ISWiProj.ISWiFeatures)
{
$strProject = $strProject + "Feature: " + $m_Feature.Name + 'n'
$strProject = $strProject + "Components: "
ForEach ($m_Component In $m_Feature.ISWiComponents)
{
$strProject = $strProject + $m_Component.Name + " "
}
}
ConsoleWrite($strProject + 'n')
$m_ISWiProj.CloseProject()

Any help is wellcome.
Labels (1)
0 Kudos
(1) Reply
Evan_Border
Level 8

Roman1 wrote:
Hello,
I am trying to write an PowerShell automation wrapper for IS2013. On this PC IS2013 is installed and is used to build all setups.

The first error I see is:

===================
New-Object : COM-Class factory for Component CLSID {52BA76F5-D0A7-4F2E-BD4A-45F8F2CE6A55} can not be called
Error: 80040154 class not registered (exception HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG)).
+ $m_ISWiProj = New-Object -com ISWiAuto20.ISWiProject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
+ FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
===================

Does anybody know, what wrong is here?


Be sure to use 32-bit PowerShell. I suspect it isn't seeing the class because 64-bit PowerShell is being used.

Call PowerShell.exe from under SysWOW64 instead of System32.
Also use the -STA parameter to force single - threaded operation.
0 Kudos