- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- InstalShield 2023 developed msi failing
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
InstalShield 2023 developed msi failing
We recently upgraded our ism file from 2014 to 2023. Now it is failing to execute with the below Powershell script. The error we are getting is give below although we have installed latest version of InstallShield and we can open that manually.
Unable to open file: C:\INSTAL~1\GENERA~1\Cmail.ism. : The project was created using a more recent version of InstallShield Developer or the project has been updated to a more recent version of InstallShield Developer.
At C:\InstallShield MSI's\BuildISMv2.ps1:26 char:1
+ $comProjectObject.OpenProject($ISMFilePath)
+ CategoryInfo : OperationStopped: (:) [], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
OperationStopped: Unable to build MSI.
At C:\Octopus\Applications\Dev\Clarksons.CMail.Addin\80.0.141\Octopus.Action.CustomScripts.PostDeploy.ps1:10 char:5
+ throw "Unable to build MSI. $_"
And the powershell script is also given below.
$ErrorActionPreference = "stop"
$scriptArg = "-Command & C:\INSTAL~1\BuildISMv2.ps1 -ProductVersion 80.0.141 -ProductFilePath C:\Octopus\Applications\Dev\Clarksons.CMail.Addin\80.0.141 -ISMFilePath C:\INSTAL~1\GENERA~1\Cmail.ism"
write-verbose $scriptArg
$exitcode = Start-Process -FilePath "C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe" -ArgumentList $scriptArg -NoNewWindow -wait -PassThru
if($exitcode.exitcode -ne 0)
{
throw "Unable to build MSI. $_"
}
if(-not (Test-path -path "\\clarksons.co.uk\soft_deploy\Core_Apps\CKN\CMail\80.0.141"))
{
write-verbose "Creating version folder for cmail"
New-Item -path "\\clarksons.co.uk\soft_deploy\Core_Apps\CKN\CMail\80.0.141" -ItemType Directory | write-verbose
}
copy-item -Path 'C:\InstallShield MSI''s\Generated Installers\Cmail\Cmail.msi' -Destination "\\Clarksons.co.uk\soft_deploy\Core_apps\CKN\CMail\80.0.141"
Write-output "MSI build and copied to here: \\Clarksons.co.uk\soft_deploy\Core_apps\CKN\CMail\80.0.141"
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
The message "The project was created using a more recent version of InstallShield...." would suggest that you are attempting to build the 2023 project with the old 2014 Installshield engine.
Check that your powershell script which calls Installshield (possibly BuildISMv2.ps1) isn't pointing to the Installshield 2014 Iscmdbld.exe.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi, no it is not pointing to 2014, the BuildISMv2.ps1 is pointing to 2023 InstallShield. And even then we get same error
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
This is our script in BuildISMv2.ps1 and the line which is failing is $comProjectObject.OpenProject($ISMFilePath). Should we use a new variation to open the file?
Please see the full script below.
param
(
[cmdletbinding()]
[string]$ProductVersion,
[string]$ProductFilePath,
[string]$ISMFilePath
)
$ErrorActionPreference = "Stop"
if(-not (Test-path -Path $ISMFilePath))
{
throw "Unable to find ISM file at $ISMFilePath"
}
if(-not (Test-path -Path $ProductFilePath))
{
throw "Unable to find Product files path at $ProductFilePath"
}
write-output "Creating ISW Com Object"
$comProjectObject = New-object –com ISWiAuto21.ISWiProject
write-output "Opening ISM Project file"
$comProjectObject.OpenProject($ISMFilePath)
write-output "Updating Project Version to $ProductVersion"
$comProjectObject.ProductVersion = $ProductVersion
$productCode = (new-guid).Guid
write-output "Updating Project Code to $ProductCode"
$comProjectObject.ProductCode = "{$productCode}"
write-output "Updating file path to build the MSI from... $ProductFilePath"
$comProjectObject.ISWiPathVariables("APPLICATIONPATHFILES").Value = $ProductFilePath
write-output "Updating Prevent downgrade Version Minimum"
$checkSetting = $comProjectObject.IswiUpgradeTableEntries | Where-Object {$_.DisplayName -eq "PreventDowngrade"}
if($null -eq $checkSetting)
{
Write-output "Unable to find upgrade table propery 'PreventDowngrade', will not update"
}
else
{
Foreach($tableObj in $comProjectObject.IswiUpgradeTableEntries)
{
if($tableObj.DisplayName -eq "PreventDowngrade")
{
$tableObj.VersionMin = "$ProductVersion"
Write-output "Set PreventDowngrade min version to $ProductVersion"
}
}
}
write-output "Saving and closing project"
$comProjectObject.SaveProject()
$comProjectObject.CloseProject()
Write-output "Starting MSI Build"
$response = Start-Process -FilePath "C:\Program Files (x86)\InstallShield\2023 SAB\System\IsCmdBld.exe" -ArgumentList "-p `"$ISMFilePath`" -r Build" -Wait -PassThru -NoNewWindow
if($response.ExitCode -eq 0)
{
Write-Output "Build complete"
}
else
{
Throw "Build did not complete successfully"
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @ClarksonsCmail ,
You need to change the automation layer dll version,
Try to change your automation object from ISWiAuto21 to ISWiAuto29
From:
$comProjectObject = New-object –com ISWiAuto21.ISWiProject
To
$comProjectObject = New-object –com ISWiAuto29.ISWiProject
You need to change this dll version as per the installshield version you are using.
Please try it and let us know it works or still you are facing an issue.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi thanks for your reply, it fixed our initial problem.
However, we are now getting this error ISDEV : fatal error -7159: The product license has expired or has not yet been initialized.
We have used the correct license for the standalone build but still getting this error.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @ClarksonsCmail ,
Good to hear it worked,
Did you mean to say you are seeing a license error now, like SDEV : fatal error -7159:
How you have activated your SAB, using license file? or connected to license server?
As per the error, its not activated, You can confirm by doing a command line build by following below steps,
Open cmdlet in administrator mode, navigate to system path and try to build a sample ism file and verify it builds without any error or not,
C:\Program Files (x86)\InstallShield\2023 SAB\System\IsCmdBld.exe" -p "<path to ism>"
If you see the same error, then SAB2023 is not activated, Please try to activate again and then verify build again.
If you still face same error, even after successfully activation,
Please reach out to the support team who will be able to help you with this activation or license issue - you can contact them directly via phone using number provided at this link: they will help you to solve this quickly.
https://community.flexera.com/t5/Support-Information/Support-Contacts/ta-p/94720