This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: InstallShield Automation Object error, object does not support property
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
02:28 PM
InstallShield Automation Object error, object does not support property
I have an InstallScript MSI project where I have created the Private Property CDVersion, with the value 1.1.0.280. I want to use a VB Script to increment that number by one each time a build is made. I'm using the program Visual Build Professional by Kinook to automate the build process, and execute this step. I'm not familiar with VB, so I tried to modify the following script that is used to increment the ProductVersion property by substituting CDVersion in place of ProductVersion , but it is not working. I get the error, (VBScript) script code at Line 19, Column 1 (Object doesn't support this property or method: 'objInst.CDVersion'). Can anyone help??
Set objInst = CreateObject("ISWiAuto14.ISWiProject")
' for InstallShield 2008 (use SAAuto14.ISWiProject for standalone)
' open the project file
objInst.OpenProject "C:\My Setups\Trios2_Release\Trios2_Release.ism"
' this code demonstrates incrementing the revision version number
' 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, ".")
objInst.SaveProject
objInst.CloseProject
Set objInst = CreateObject("ISWiAuto14.ISWiProject")
' for InstallShield 2008 (use SAAuto14.ISWiProject for standalone)
' open the project file
objInst.OpenProject "C:\My Setups\Trios2_Release\Trios2_Release.ism"
' this code demonstrates incrementing the revision version number
' 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, ".")
objInst.SaveProject
objInst.CloseProject
(9) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
03:03 PM
ProductVersion, ProductCode, and a handful of others are special properties that you can hang directly from the ISWiProject object. To set other properties, including your custom properties, please see the help for the ISWiProperty object.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
03:38 PM
I have figured out what object needs to be called to get to the Private property I created, however I'm not very familiar with Visual Basic so I need a way to increment the last number of the pProperty.Value +1
Set pProperty = ISWiProject.ISWiProperties.Item("CDVersion"), pProperty.Value = "1.1.0.280"
Can you help with that?
Set pProperty = ISWiProject.ISWiProperties.Item("CDVersion"), pProperty.Value = "1.1.0.280"
Can you help with that?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
03:53 PM
The sample code you posted from Split to Join handles that; you'll just need to retrieve your old CDVersion value, split it at the dots, add one to the last field, and rejoin the fields with dots before setting the property...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 12, 2008
02:12 PM
Robert,
I'm no expert with VisualBasic, but this script continues to fail with the error Line1 Column 3, object does not support this property or method. Here is my script-Any help would be much appreciated. If I created the Property CDVersion in the property manager, is there any reason why this is not working like it works for the ProductVersion Property?
ISWiProject = CreateObject("ISWiAuto14.ISWiProject")
' for InstallShield 2008 (use SAAuto14.ISWiProject for standalone)
' open the project file
ISWIProject.OpenProject("C:\My Setups\Trios2_Release\Trios2_Release.ism")
cdString = ISWiProject.ISWIProperties("CDVersion")
'Get the last value and incrememt it.
value = Val(cdString.Substring(cdString.LastIndexOf(".") + 1)) + 1
'add it back to the string
newString = cdString.Substring(0, cdString.LastIndexOf(".") + 1) + CStr(value)
ISWiProject.ISWIProperties("CDVersion") = newString
ISWiProject.SaveProject()
ISWiProject.CloseProject()
I'm no expert with VisualBasic, but this script continues to fail with the error Line1 Column 3, object does not support this property or method. Here is my script-Any help would be much appreciated. If I created the Property CDVersion in the property manager, is there any reason why this is not working like it works for the ProductVersion Property?
ISWiProject = CreateObject("ISWiAuto14.ISWiProject")
' for InstallShield 2008 (use SAAuto14.ISWiProject for standalone)
' open the project file
ISWIProject.OpenProject("C:\My Setups\Trios2_Release\Trios2_Release.ism")
cdString = ISWiProject.ISWIProperties("CDVersion")
'Get the last value and incrememt it.
value = Val(cdString.Substring(cdString.LastIndexOf(".") + 1)) + 1
'add it back to the string
newString = cdString.Substring(0, cdString.LastIndexOf(".") + 1) + CStr(value)
ISWiProject.ISWIProperties("CDVersion") = newString
ISWiProject.SaveProject()
ISWiProject.CloseProject()
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 12, 2008
02:54 PM
If it's complaining about line 1, perhaps start off with "set":
Set ISWiProject = CreateObject("ISWiAuto14.ISWiProject")
(It might also be advisable to use a different variable name from "ISWiProject", to avoid confusion between that and the InstallShield object name...)
Set ISWiProject = CreateObject("ISWiAuto14.ISWiProject")
(It might also be advisable to use a different variable name from "ISWiProject", to avoid confusion between that and the InstallShield object name...)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 12, 2008
03:21 PM
Robert,
I saw that I had let off the Set from the 1st line, so I added it, but I'm still getting the error, script code at Line 9, Column 9 (Object doesn't support this property or method: 'valueItem')
Set ISWiProject = CreateObject("ISWiAuto14.ISWiProject")
' for InstallShield 2008 (use SAAuto14.ISWiProject for standalone)
' open the project file
ISWIProject.OpenProject("C:\My Setups\Trios2_Release\Trios2_Release.ism")
valueItem = ISWiProject.ISWIProperties.Item("CDVersion")
cdString=valueItem.Value
'Get the last value and incrememt it.
value = Val(cdString.Substring(cdString.LastIndexOf(".") + 1)) + 1
'add it back to the string
newString = cdString.Substring(0, cdString.LastIndexOf(".") + 1) + CStr(value)
ISWiProject.ISWIProperties.Item("CDVersion") = newString
ISWiProject.SaveProject()
ISWiProject.CloseProject()
I saw that I had let off the Set from the 1st line, so I added it, but I'm still getting the error, script code at Line 9, Column 9 (Object doesn't support this property or method: 'valueItem')
Set ISWiProject = CreateObject("ISWiAuto14.ISWiProject")
' for InstallShield 2008 (use SAAuto14.ISWiProject for standalone)
' open the project file
ISWIProject.OpenProject("C:\My Setups\Trios2_Release\Trios2_Release.ism")
valueItem = ISWiProject.ISWIProperties.Item("CDVersion")
cdString=valueItem.Value
'Get the last value and incrememt it.
value = Val(cdString.Substring(cdString.LastIndexOf(".") + 1)) + 1
'add it back to the string
newString = cdString.Substring(0, cdString.LastIndexOf(".") + 1) + CStr(value)
ISWiProject.ISWIProperties.Item("CDVersion") = newString
ISWiProject.SaveProject()
ISWiProject.CloseProject()
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 12, 2008
03:37 PM
Please see the "ISWiProperty Object" help topic for some code; I think you'll want "Set" at the beginning of line 9, and to go through the Value property when you're setting the new value to newString...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 12, 2008
03:53 PM
Something like this, perhaps, only with fewer temporary variables:
set oISM = CreateObject("ISWiAuto15.ISWiProject")
oISM.OpenProject "SampleApp3000.ism"
' get the property object
set oMyProp = oISM.ISWiProperties("CDVersion")
' store its old value
oldVersion = oMyProp.Value
WScript.Echo "Old version = " & oldVersion
' break it at dots
verArr = Split(oldVersion, ".")
' increment last field
verArr(UBound(verArr)) = CStr(verArr(UBound(verArr)) + 1)
' put it back together
newVersion = Join(verArr, ".")
WScript.Echo "New version = " & newVersion
' save new value
oMyProp.Value = newVersion
oISM.SaveProject
oISM.CloseProject
set oISM = nothing
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 13, 2008
08:31 AM
Robert,
Thanks from the bottom of my heart. I really appreciate your help on this issue. Thanks again for all of your help!
Thanks from the bottom of my heart. I really appreciate your help on this issue. Thanks again for all of your help!