Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] User Tips, Tricks and Samples

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
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.
'TBD

'Save changes
objInst.SaveProject
objInst.CloseProject
end function

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

Martin
Reply With Quote
  #2  
Old 12-28-2005, 12:07 PM
mweinberger mweinberger is online now
Registered User
 
Join Date: 12-23-2005
Posts: 40
Current thought

In case anybody is following this thread, I'm currently thinking of solving the problem from within InstallShield. The IS project should be able to pull its own product code for the uninstall shortcut argument rather than having it hard coded. I should be able to do something like

/M[PRODUCT_GUID]

rather than

/M{9EF6F5CC-69FC-433D-9D2E-971E55CAE819}

as the argument for IDriver. The specific thought above failed, but I continue to try.
Reply With Quote
  #3  
Old 12-28-2005, 12:15 PM
mweinberger mweinberger is online now
Registered User
 
Join Date: 12-23-2005
Posts: 40
I did it!

Cool, I just saved myseslf hours of work on all my projects. The solution is:

/M[ProductCode]

You an create an uninstall shortcut that automatically updates, when the producct code changes by using the above code rather than the explict one that the InstallShield product itself creates. For those that use the /x method the principle should be the same.

:-)

Martin A. Weinberger
ButterflyVista
http://www.butterflyvista.com/
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 12:48 PM.


Copyright 1999-2019 Kinook Software, Inc.