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

trouble with persistent variables

If I use a persistent local variable in the Process Exit Code Variable field of an Execute Process, why isn't the return code shown in the Property Manager?
Labels (1)
0 Kudos

(5) Replies
enanrum
Level 9

Hugn! What you mean ming!

I think your missing the meaning of persistant variables. This would be a variable that you can store in the VPD to read on re-install, un-install or even patch of the product!

I believe what is in the Property Manager is just the default value of the Variable!

Hope this helps!
Regards,
Tom
0 Kudos
Kent_Fishman
Level 3

So how can I display the return code of a variable instantiated in the Process Exit Code Variable field?
0 Kudos
enanrum
Level 9

Acdording to the help you should just be able to get the value with $V(RETURN_CODE)!!!

Although: I have a call into support because it does not seem to be working!

What I have tried is a simple test with 2 dialogs that have a textbox on it and I use a variable RETURN_CODE with an initial value of 'XXXX' for both dialogs. I then added them to my sequences and added an Execute process in between them using RETURN_CODE for the variable!

For my command of the EP I just used a basic unix cmd 'pwd' - when I run this on Unix, the first dialog shows XXX then it runs the command and the next dialog shows 0. But when I run on Windows it showes the same thing, 0, I would think it should be non-zero but it is not!!!!

So I changed the command to 'asdf' and got the same results on Unix and Windows! I even added a Custom Event to look at the $V(RETURN_CODE) and got the same results!

Ug!
0 Kudos
Kent_Fishman
Level 3

Could you share your code to print out the return code that displays the XXX and the 0?
0 Kudos
enanrum
Level 9

First off - in trying this on my own it doesn't seem to be working! I do have an incident in with InstallShield Support and waiting to hear from them!

But, as a simple test, you can see if you get the same results I am because the return code for me anyway always returns a 0, even when I use an invalid command!

Create a new blank dialog box and just add a textbox on it and use RETURN_CODE for the variable and give it an initial value of XXXX.

Add this to the sequence and add the Execute process after it and use the same variable, RETURN_CODE, for the Process Exit whatever variable!

Add the same dialog after the EP and run and you should see the two different results!

Or - you can add a Custom Event after the Execute process and just get the variable by:

String rc = arg0.resolveString("$V(RETURN_CODE)");
JOptionPane.showMessageDialog(null,"Return code = " + rc);

Regards,
Tom
0 Kudos