Project • This information applies to the following project types:
• | Basic MSI |
• | InstallScript MSI |
Call BuildPatch to build the patch configuration identified by the current patch object. This action has the same effect as right-clicking on a patch configuration in the Patch Design view and then selecting Build a Patch.
Syntax
BuildPatch()
Parameter
Property |
Description |
PatchConfigErrorCount |
Include the error count associated with a particular patch build. |
PatchConfigWarningCount |
Include the warning count associated with a particular patch build. |
Example
The following Visual Basic lines demonstrate this method:
'Create the project object
dim pProject
set pProject = CreateObject("IswiAutoAutomation Interface Version.ISWiProject")
'Call the OpenProject method
'####################################################################
'# THIS SAMPLE WILL NOT EXECUTE PROPERLY WITHOUT A VALID PROJECT PATH
'####################################################################
'pProject.OpenProject("\Your project.ism")
pProject.OpenProject("C:\Documents and Settings\Testlab\My Documents\MySetups\your project name-21.ism")
'Call the OpenProject method
' Get existing configuration
Set oMyConfig = pProject.ISWiProductConfigs.Item("Product Configuration 1")
' Assume project already has release configuration…
Set oNewRelease = oMyConfig.ISWiReleases.Item("Release 1")
' Make sure release setting is uncompressed to build the patch…
oNewRelease.Compressed = False
oNewRelease.SetupEXE = True
' Create and set signing parameters...
Set oMyPatchConfig = pProject.AddPatchConfig("PatchDemo1")
oMyPatchConfig.SignPackage = True
oMyPatchConfig.SignUpdateExe = True
oMyPatchConfig.SignatureSPC = "C:\Users\TestLab\Desktop\Test.pfx"
oMyPatchConfig.SignaturePassword = "XX"
Set oMyLatestImage = oMyPatchConfig.AddUpgradedImage("LatestImg1")
Set oMyPreviousImage = oMyLatestImage.AddTargetImage("PrevImage1")
' Set base image…
oMyPreviousImage.MsiPath = "<ISProjectFolder>BaseImage\PatchDesignInterfaceDemo.msi"
' Set base MSI path to the existing patch configuration
'MyPatchConfig.ISWiUpgradedImages.Item("LatestImg1").ISWiTargetImages.Item("PrevImage1").MsiPath = "<ISProjectFolder>BaseImage\PatchDesignInterfaceDemo.msi"
pProject.SaveProject
oNewRelease.Build( )
oMyPatchConfig.BuildPatch
MsgBox "Patch Congifuration Config1 build with " & _
oMyPatchConfig.PatchConfigErrorCount & " Errors and " & _
oMyPatchConfig.PatchConfigWarningCount & " Warnings"
pProject.CloseProject
InstallShield 2019 Help LibraryApril 2019 |
Copyright Information | Flexera |