A minor observation about variables.

Got a problem you cannot solve? Try here.
Post Reply
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

A minor observation about variables.

Post by bokkie »

The following code snippet works ok in my sample project. Where I've put ... picture that as implying there could be lots of code inbetween the statements. As you can see, the Set Variable and MessageBox show the connection to the variable PHSCODE. What's not so apparent, is the Run Program statement which returns the value for PHSCODE but as you can see you don't see the variable directly. I know for sure that the variable is referenced in the Run Program description but someone else confronted by possibly, 100's of lines of code would not necessarily 'see' it. I've got no problem with the code generated and maybe my Run Program is not the best vehicle to use but it does work. There's possibly a good reason why Run Program does not list the variables that participate but I thought it was worth mentioning as an observation.

Set Variable PHSCODE to
...
...
Run Program $SUPPORTDIR$\\ConsoleApplication1.exe 23 5, startup in folder C:\\Temp (WAIT)
...
...
MessageBox: PHSCODE value., The value returned from the support executable was $PHSCODE$
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
Post Reply