cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
macd81o0
Level 3

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?
Labels (1)
0 Kudos
(4) Replies
pv7721
Level 20

Would it be possible for you to post your project?
0 Kudos
macd81o0
Level 3

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.
0 Kudos
pv7721
Level 20

Just a dummy project that would read the password and then the script would process it.
0 Kudos
macd81o0
Level 3

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
0 Kudos