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: HELP: Trying to read a value from an INI file.
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
‎Aug 15, 2007
12:27 PM
HELP: Trying to read a value from an INI file.
Hello everyone,
I have downloaded and installed properly the Wizard Beans and one of them is Read INI Value. I have added it to my sequences.
The problem I am having is how to access the data that is being read.
I saw somewhere that I should be able to use (within my installation) the following: $W(BeanID.value) but the value is bringing back Null. It is my understanding that "value" is actually a hidden property but it seems that I can't read the value.
I am 99% sure that the INI file is being read but I could be wrong.
I would also like to access these values in a custom event (java code) so I can read or manipulate the data. I have not yey figured out what java code I need to use in order to read a Wizard Bean Property.
Your help is greatly appreciated.
Peter Floyd
I have downloaded and installed properly the Wizard Beans and one of them is Read INI Value. I have added it to my sequences.
The problem I am having is how to access the data that is being read.
I saw somewhere that I should be able to use (within my installation) the following: $W(BeanID.value) but the value is bringing back Null. It is my understanding that "value" is actually a hidden property but it seems that I can't read the value.
I am 99% sure that the INI file is being read but I could be wrong.
I would also like to access these values in a custom event (java code) so I can read or manipulate the data. I have not yey figured out what java code I need to use in order to read a Wizard Bean Property.
Your help is greatly appreciated.
Peter Floyd
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 15, 2007
12:36 PM
In the $W expression, have you replaced "BeanID" with the (case sensitive) actual bean ID?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 16, 2007
12:27 PM
Hey Robert,
Yes I have. I have changed the bean from bean8 to beanSeqVersion.
The Read INI bean, I am setting the following:
Bean ID = beanSeqVersion
File Name = $J(is.external.home)\support\ODPI_System.ini
Subject = OPTIONS
Variable = SEQ_VERSION
The ODPI_System.ini file has the following:
[OPTIONS]
SEQ_VERSION=1.0
WRAPPER_VER=1.0
LOG_DIR=$J(is.external.home)\logs
LOG_FILENAME=ODPI_Wrapper.log
ABORTONCAFAIL=1
Immediately after, I am Setting a Variable. It has the following:
Bean ID = beanSeqVersion
Name = varSeqVersion
Value = $W(beanSeqVersion.value)
If I want to access the $W(beanSeqVersion.value) in a custom event (Custom Java Code), how would I access that?
Peter
RobertDickau wrote:
In the $W expression, have you replaced "BeanID" with the (case sensitive) actual bean ID?
Yes I have. I have changed the bean from bean8 to beanSeqVersion.
The Read INI bean, I am setting the following:
Bean ID = beanSeqVersion
File Name = $J(is.external.home)\support\ODPI_System.ini
Subject = OPTIONS
Variable = SEQ_VERSION
The ODPI_System.ini file has the following:
[OPTIONS]
SEQ_VERSION=1.0
WRAPPER_VER=1.0
LOG_DIR=$J(is.external.home)\logs
LOG_FILENAME=ODPI_Wrapper.log
ABORTONCAFAIL=1
Immediately after, I am Setting a Variable. It has the following:
Bean ID = beanSeqVersion
Name = varSeqVersion
Value = $W(beanSeqVersion.value)
If I want to access the $W(beanSeqVersion.value) in a custom event (Custom Java Code), how would I access that?
Peter
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 16, 2007
12:29 PM
You should be able to call resolveString in custom code to expand the value of a $X expression. Searching these forums and the online help for "resolveString" should give examples.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 16, 2007
01:56 PM
RobertDickau wrote:
You should be able to call resolveString in custom code to expand the value of a $X expression. Searching these forums and the online help for "resolveString" should give examples.
Thanks for the info.
Am I doing everything correct to use the Read INI Value?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 16, 2007
02:45 PM
I've never used that (custom?) wizard action, but it appears you're setting the properties correctly; as a test, does it work if you put the INI file somewhere else (such as hard-coded location)?