How to put self-gen ProdCode into distr source ?
Posted 14 November 2003 - 10:09
I have the following problem:
I have the self-written database application that performs the product version calculation each time when developers introduces new features or bugfixes to the project. I suppose that Product Code is GUID and my app automatically generate the Product Code when the Product version changes.
How can I automatically put these values (new version and self-gen Product Code) to the InstallShield Express source ?
Should I use another installator shell to perform this task ? It seems that InstallShield Express supports no automation at all
Thanks in advance,
Posted 20 November 2003 - 02:27
|Dim oneWindowsInstaller, oneInstallerDatabase, oneView, oneRecordObject|
' Update the "Update" table in the MSI database file
Set oneWindowsInstaller = CreateObject("WindowsInstaller.Installer")
Set oneInstallerDatabase = oneWindowsInstaller.OpenDatabase( "c:\test.ism" , 1)
' Set up SQL query for the upgrade table - DETECT NEWER VERSION INSTALLED
Set oneView = oneInstallerDatabase.OpenView ("SELECT * FROM Upgrade WHERE ActionProperty = 'CHECKCURRENTINSTALL'")
' Execute the view, so its methods can be used.
Set oneRecordObject = oneView.Fetch
' Assign new values to recordset
oneRecordObject.StringData (2) = "Value you want to change"
oneView.Modify 4, oneRecordObject
Set oneRecordObject = Nothing
' Commit database changes
' Release objects
Set oneWindowsInstaller = Nothing
Set oneInstallerDatabase = Nothing
set oneView = Nothing
Edited by Glytzhkof, 20 November 2003 - 02:30.
Posted 20 November 2003 - 05:49
Actually I found the automation interface in IS Developer that allows to change the values in the source
Anyway this is a good example, thanks again