Community Forums
Results 1 to 2 of 2

Thread: Basic MSI project InstallShelid automation using Powershell script

  1. #1
    Join Date
    May 2018
    Posts
    1

    Basic MSI project InstallShelid automation using Powershell script

    Hello,

    I want to automate my Basic MSI project (.ism porject) using Powershell scripting. I'm using Installshield 2018 version.Through script, I want to update the below details and also need to handle errors occurred(if any).

    Installation info -> General Info tab -> Product version, Title
    Media -> Releases -> Express -> MSI Package File Name

    Even, I'm unable to create an object and below is the code.

    $designerProject = New-Object -ComObject "ISWiAuto24.ISWiProject"
    $ismFilepath = "$scriptPath\Designer.ism"
    $designerProject.OpenProject($ismFilepath)

    Getting 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

    Plz anyone help me in this.

    Thanks,
    MurtyIN

  2. #2
    Join Date
    Jan 2015
    Posts
    45
    you can achieve the same by using VB script as well


    If Wscript.Arguments.Count = 0 Then
    Wscript.Echo "Please enter the command arguments. >> Build version number"
    End If



    Set m_ISWiProject = CreateObject("IswiAuto23.ISWiProject")

    If ( IsObject(m_ISWiProject) = False)Then
    Wscript.Echo "IS2016 Automation Object creation failed."
    End If

    strFile = Wscript.Arguments(0)
    svPVer = Wscript.Arguments(1)
    svVar = Wscript.Arguments(2)

    WScript.echo svVar

    m_ISWiProject.OpenProject strFile

    WScript.echo "Opened project" & strFile

    'Set pProperty = m_ISWiProject.ISWIProperties.Item("BUILDVERSION")

    'pProperty.Value = svVar

    WScript.echo svPVer

    m_ISWiProject.ProductVersion = svPVer

    m_ISWiProject.SaveProject

    m_ISWiProject.CloseProject

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •