Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-08-2004, 04:05 PM
fender4645 fender4645 is online now
Registered User
 
Join Date: 04-08-2004
Posts: 1
Using 'Build Number' macros for versioning InstallShield 9 installers

Hi all-

I'm using the Kinook-recommended script to increment build numbers:

----
Set objMacro = Application.Macros(vbldProject).Item("BUILD_NUM")

If objMacro Is Nothing Then
' if the macro doesn't exist yet, initialize to 100
Application.Macros(vbldProject).Add "BUILD_NUM", "100"
Else
' otherwise increment the value
objMacro.Value = CLng(objMacro.Value)+1
End If
-----

I'm also using the recommended script to incrememnt the version of my IS 9 installer:

-----
Set objInst = CreateObject("ISWiAutomation9.ISWiProject") ' use "ISWiAutomation9.ISWiProject" for DevStudio

' open the project file
objInst.OpenProject "E:\installers\app\App.ism"

' retrieve and split the ProductVersion
verArr = Split(objInst.ProductVersion, ".")
' increment last field
verArr(UBound(verArr)) = CStr(verArr(UBound(verArr)) + 1)
' update the project
objInst.ProductVersion = Join(verArr, ".")

' and save changes
objInst.SaveProject
objInst.CloseProject
-------

Is there any way to carry over the 'BUILD_NUM' macro from the first script and use it in the IS script? I pretty much have no VB experience and I'm not sure exactly haw the IS script is really working.

Any help would greatly appreciated. Thanks!
Reply With Quote
  #2  
Old 04-12-2004, 08:56 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Assuming this code was all placed in a single Run Script step, it looks like you would just replace

verArr(UBound(verArr)) = CStr(verArr(UBound(verArr)) + 1)

with

verArr(UBound(verArr)) = objMacro.Value
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 08:15 AM.


Copyright © 1999-2023 Kinook Software, Inc.