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
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Problem using a InstallAnywhere variable
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
‎Dec 14, 2009
11:55 AM
Problem using a InstallAnywhere variable
Using InstallAnywhere 8.0
I'm trying to use a IA variable coming from Get Password (Panel/Console). The variable is $USER_SUPPLIED_PASSWORD$. I try to use the variable in a script but I'm only get the value of "$".
Here is the script that I working with:
dbHost=`hostname`
dbName=rsdb
dbType=SYBASE
dbPort=4100
dbUser=sa
dbPass=$USER_SUPPLIED_PASSWORD$
echo $DBPASS$ > /opt/dbPass.txt
java -cp $NPSCLASSPATH nps/rdbms/db_version_level $dbHost $dbPort $dbName $dbUser $dbPass $dbType
After running the installer, I've checked dbPass.txt file and it only contains a "$". What am I doing wrong?
I'm trying to use a IA variable coming from Get Password (Panel/Console). The variable is $USER_SUPPLIED_PASSWORD$. I try to use the variable in a script but I'm only get the value of "$".
Here is the script that I working with:
dbHost=`hostname`
dbName=rsdb
dbType=SYBASE
dbPort=4100
dbUser=sa
dbPass=$USER_SUPPLIED_PASSWORD$
echo $DBPASS$ > /opt/dbPass.txt
java -cp $NPSCLASSPATH nps/rdbms/db_version_level $dbHost $dbPort $dbName $dbUser $dbPass $dbType
After running the installer, I've checked dbPass.txt file and it only contains a "$". What am I doing wrong?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 14, 2009
12:08 PM
Would it be possible for you to post your project?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 14, 2009
09:02 PM
Sorry, I can't post my project but I can send you parts of it. I could strip the project down to the script and the Password Panel if that would help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 15, 2009
12:42 AM
Just a dummy project that would read the password and then the script would process it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 16, 2009
11:18 AM
Attached to this post is my project.
As you will see in the project, we are trying to see how to set the local script variable so that we can use it when we pass it into the java class.
The following part of the script works correctly because we use dbPass2 ,that was set correctly, in the java command parameters:
dbPass=`$USER_SUPPLIED_PASSWORD$`
echo $dbPass > /opt/dbPass.txt <<< incorrect value
echo $USER_SUPPLIED_PASSWORD$ > /opt/userPass.txt <<< correct value
dbPass2=`echo $USER_SUPPLIED_PASSWORD$`
echo $dbPass2 > /opt/dbPass2.txt <<< incorrect value
dbPass3="$USER_SUPPLIED_PASSWORD$"
echo $dbPass3 > /opt/dbPass3.txt <<< incorrect value
The odd thing is it doesn't work if we just use:
dbPass2=`echo $USER_SUPPLIED_PASSWORD$`
echo $dbPass2 > /opt/dbPass2.txt
Also we've tried to just use $USER_SUPPLIED_PASSWORD$ in the java command parameters.
It seems to us that there is a problem with using the IA variable directly
As you will see in the project, we are trying to see how to set the local script variable so that we can use it when we pass it into the java class.
The following part of the script works correctly because we use dbPass2 ,that was set correctly, in the java command parameters:
dbPass=`$USER_SUPPLIED_PASSWORD$`
echo $dbPass > /opt/dbPass.txt <<< incorrect value
echo $USER_SUPPLIED_PASSWORD$ > /opt/userPass.txt <<< correct value
dbPass2=`echo $USER_SUPPLIED_PASSWORD$`
echo $dbPass2 > /opt/dbPass2.txt <<< incorrect value
dbPass3="$USER_SUPPLIED_PASSWORD$"
echo $dbPass3 > /opt/dbPass3.txt <<< incorrect value
The odd thing is it doesn't work if we just use:
dbPass2=`echo $USER_SUPPLIED_PASSWORD$`
echo $dbPass2 > /opt/dbPass2.txt
Also we've tried to just use $USER_SUPPLIED_PASSWORD$ in the java command parameters.
It seems to us that there is a problem with using the IA variable directly