cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Sairen
Level 7

Execute Target File - Not being executed

Hi, all - hoping I might run this by you and get at minimum some sanity checks to try... because I am definitely losing my sanity!

I'm trying to launch a batch file that I'm installing with the program. It's supposed to set and export some environment variables. I'm installing, for now, just on a Linux VM. The VM should not be an issue here, as I have somehow gotten actions like this to work before... just not now.

In Post-Install, I have an Execute Target Action action.
Target: $USER_INSTALL_DIR$$/$bin$/$ext_setenv.sh
Command Line: . ./$EXECUTE_FILE_TARGET$

There are no errors, and the log file says the action was performed successfully, but the env. variables aren't being exported.

Anyone know what might be going wrong, or some tests that might be useful? It's my first time posting in this forum, so if I'm not providing you with the right info, please help me out and tell me what I should be writing. 🙂
Thanks
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

Would the Set System Environment Variable action be appropriate? Or would the Execute Script/Batch File action be more appropriate? If you can, perhaps post the commands you're using in the shell script?
0 Kudos
Sairen
Level 7

CURRENTDIR=`pwd`
cd ..
MYPROGDIR=`pwd`
cd $CURRENTDIR
ODBCINI=$MYPROGDIR/etc/odbc.ini
LD_LIBRARY_PATH=$MYPROGDIR/odbc/lib:$MYPROGDIR/bin:$MYPROGDIR/fulltext/k2/_ilnx21/bin:/usr/lib
PATH=$PATH:$MYPROGDIR/fulltext/k2/_ilnx21/bin
export MYPROGDIR ODBCINI LD_LIBRARY_PATH PATH


I'll give some of those other action types a try. I think I had at some point tried the Execute Batch File action, and rejected it - possibly because I had the Execute File action working. Thanks - please let me know if you see anything concerning in this batch file.
0 Kudos
jebutler
Level 2

Sairen wrote:
CURRENTDIR=`pwd`
cd ..
MYPROGDIR=`pwd`
cd $CURRENTDIR
ODBCINI=$MYPROGDIR/etc/odbc.ini
LD_LIBRARY_PATH=$MYPROGDIR/odbc/lib:$MYPROGDIR/bin:$MYPROGDIR/fulltext/k2/_ilnx21/bin:/usr/lib
PATH=$PATH:$MYPROGDIR/fulltext/k2/_ilnx21/bin
export MYPROGDIR ODBCINI LD_LIBRARY_PATH PATH


I'll give some of those other action types a try. I think I had at some point tried the Execute Batch File action, and rejected it - possibly because I had the Execute File action working. Thanks - please let me know if you see anything concerning in this batch file.


If you use the Execute Script/Batch File, then simply pasting these commands into the "Script:" box should do the trick.

In regard to your LD_LIBRARY_PATH, do you really have libraries in bin directories? If so, you should consider moving them to lib directories for the sake of consistency.
0 Kudos
Sairen
Level 7

Hi, jebutler,

Thanks for the help. Yeah, you'd think that just pasting all that into the script box would work. I've seen and tried a bunch of things that "should" work...

I've tried using the Execute Script action - it didn't do any more than the execute target file did. I tried using some separate Set Environment Variables (sequenced after all the files in Install). And while all the actions shows "SUCCESSFUL" in the log file...they are not.

Starting to run out of things to try...

I'll pass your suggestion regarding bin and lib on to the developers, but I doubt they'll be too keen to switch things around. 🙂
0 Kudos