View Single Post
Old 12-27-2005, 07:11 PM
mweinberger mweinberger is online now
Registered User
Join Date: 12-23-2005
Posts: 40
Changing InstallShield product code

Hi guys,

I want to change the product code for an InstallShield project. I can change the code using the function below but am running into a problem on how to update the 'Uninstall' shortcut, which uses the product code. I'm using the IDriver.exe method, as this project is an InstallScript MSI project.

Function InstallShieldChangeProductCode()
'Create the InstallShield Developer automation object
Set objInst = CreateObject("ISWiAuto10.ISWiProject") 'For InstallShield X
'use "ISWiAutomation.ISWiProject" for InstallShield Developer
'use "ISWiAutomation9.ISWiProject" for DevStudio 9
'use "ISWiAuto10.ISWiProject" for InstallShield X
'use "ISWiAuto1050.ISWiProject" for InstallShield 10.5
'use "ISWiAuto11.ISWiProject" for InstallShield 11

'Open the project file
objInst.OpenProject Step.ExpProperty(Builder, "Filename")

'Change the product and package codes.
objInst.PackageCode = objInst.GenerateGUID();
objInst.ProductCode = objInst.GenerateGUID();

'Update the 'Uninstall' shortcut.

'Save changes
end function

Thanks in advance for your thoughts on how to update the uninstall shortcut too.

Reply With Quote