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: Is it possible to use a custom action to set a property to a numeric value
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
‎Feb 18, 2014
03:35 PM
Is it possible to use a custom action to set a property to a numeric value
I am using a property DEFAULT_PORT in my installer that I default to a specified integer value say 16315. I have a vbscript custom action that gets the session.property("DEFAULT_PORT") and then determines if in fact the port is open..if its not it upticks the value until an open port if found.
The problem I am having is when I need to store the new integer value in the property. (defaultPort is the open port we are going to set DEFAULT_PORT to)
This does not work: ( you do not see the value being set in the msi.log file)
Session.Property("DEFAULT_PORT") = defaultPort
This will work, but now when I display the value in a later dialog it has " " around the value. So "16317" is displayed instead of 16317
Session.Property("DEFAULT_PORT") = chr(34)& defaultPort &chr(34)
Is there some other way I can assign the new value to the property to use later in the install process?
Thanks,
Erik
The problem I am having is when I need to store the new integer value in the property. (defaultPort is the open port we are going to set DEFAULT_PORT to)
This does not work: ( you do not see the value being set in the msi.log file)
Session.Property("DEFAULT_PORT") = defaultPort
This will work, but now when I display the value in a later dialog it has " " around the value. So "16317" is displayed instead of 16317
Session.Property("DEFAULT_PORT") = chr(34)& defaultPort &chr(34)
Is there some other way I can assign the new value to the property to use later in the install process?
Thanks,
Erik
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 20, 2014
07:48 AM
Anyway a property is a string value. Convert you numeric value to string.
Dim defaultPort, s1, s2
defaultPort = 16317
s1 = CStr(defaultPort)
Session.Property("DEFAULT_PORT") = s1
s2 = Session.Property("DEFAULT_PORT")
MsgBox s2
Dim defaultPort, s1, s2
defaultPort = 16317
s1 = CStr(defaultPort)
Session.Property("DEFAULT_PORT") = s1
s2 = Session.Property("DEFAULT_PORT")
MsgBox s2
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 21, 2014
08:04 AM
Thanks for the reply.
I did find CStr() call worked to reset the value without adding quotes, so when I use it later in a Dialog is displays correctly.
I did find CStr() call worked to reset the value without adding quotes, so when I use it later in a Dialog is displays correctly.