- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Need Help Converting a WSCript to PowerShell for Modifying an Install .ism..
- 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
Need Help Converting a WSCript to PowerShell for Modifying an Install .ism..
Hi there,
I'm hoping someone can help. We're looking to upgrade a wscript to PowerShell that sets some properties and Upgrade Table info....
Dim objInst, ISTemplate, UpgCode, PkgCode, PrdCode, UpgTblEntries, VerMax, MSIComment
Dim PrdVer, AddRem
Set objInst = CreateObject("IswiAuto26.ISWiProject")
ISTemplate = Wscript.Arguments(0)
objInst.OpenProject ISTemplate, False
VerMax = Wscript.Arguments(1) & "." & Wscript.Arguments(2) & "." & clng(Wscript.Arguments(3)) * 5000 + clng(wscript.Arguments(4))
ARPVer = Wscript.Arguments(1) & "." & Wscript.Arguments(2) & "." & Wscript.Arguments(3) & "." & wscript.Arguments(4)
'Set ProductVersion and ADDREMDISPLAYVER properties...
'Pad product version in case HFs sent as Major Upgrades/installer version bumped..
Set PrdVer = objInst.ISWIProperties.Item("ProductVersion")
PrdVer.Value = verMax
Set AddRem = objInst.ISWiProperties.Item("ADDREMDISPLAYVER")
AddRem.Value = ARPVer
'Set MaxVersion in Upgrade Table...
UpgCode = objInst.UpgradeCode
Set UpgTblEntries = objInst.IswiUpgradeTableEntries
For Each UpgTblEntries In objInst.ISWiUpgradeTableEntries
If UpgTblEntries.UpgradeCode = UpgCode Then
UpgTblEntries.VersionMax = VerMax
End If
Next
'Set the Package Code
Set PkgCode = objInst.ISWiSISProperties.Item("PackageCode")
PkgCode.Value = objInst.GenerateGUID
'Set the SIS Comment to reflect version for support purposes
Set MSIComment = objInst.ISWiSISProperties.Item("Comments")
MSIComment.Value = ARPVer
'Set the Product Code
PrdCode = objInst.ProductCode
objInst.ProductCode = objInst.GenerateGUID
'Wrap it up...
objInst.SaveProject
objInst.CloseProject
Can anyone point me in the right direction or help convert this script. I can use it in our workflow, I guess, but would like to 'modernize' it a bit.
Any help would be greatly appreciated!!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I went ahead and just wrote a C# utility to get the job done, but I have another Automation Interface related question.
We are going to be creating a GitHub Actions hosted runner with the ISCmdBld.exe copied to it. I believe I saw somewhere that is how the command line tool is distributed. My question is, without the full InstallShield installed, will the Automation Interface be available with just a copy to set up ISCmdBld?
Or, do I not need it with the references to it in my C# project. I guess I could try that out easily enough by simply copying the .ism and my new .exe to a folder and running on a system without InstallShield installed.