View Full Version : How Do I Automate the Patch Display Name?

01-11-2005, 05:05 PM
Through Patch Design I can set the Display Name. I would like to use the Automation Interface and call BuildPatchConfiguration to create the patch. Is there any way to automate changing the Display Name?

Also, is there a command-line interface to create the patch? I looked at ISCmdBld.exe but the help didn't mention any parameters for building a patch.


01-12-2005, 10:47 AM
If nothing else, you can modify the ISM project file with MSI Automation, as described in this InstallShield newsletter article: http://www.installshield.com/news/newsletter/0402-articles/modify.asp.

And I don't think IsCmdBld can build a patch; that Automation method you mentioned is what I'd suggest.

01-12-2005, 08:45 PM
Thank you. Based upon your example I was able write the following VBScript to change the DisplayName:

Set oMSI = CreateObject("WindowsInstaller.Installer")

' open ISM file in transacted mode
Set oDB = oMSI.OpenDatabase("C:\My Installations\ESR51\IA32\ESRMaster\ESRMasterAutoDN.ism", 1)

' fetch the record
Set oView = oDB.OpenView("SELECT * FROM MsiPatchMetadata WHERE PatchConfiguration_='PatchConfigSameCycleDiffPatch' AND Property='DisplayName'")
Set oRec = oView.Fetch

' change field 4, the Value field
oRec.StringData(4) = "Patch Version"

' update the changed record
oView.Modify 2, oRec

' close the view, commit changes, clean up
oView.Close: oDB.Commit: Set oMSI = Nothing