PDA

View Full Version : How to code "%path%" as a string


HayoOellrich
05-22-2002, 02:25 AM
Hi !

I want to modify the autoexec.bat file (to insert entries for old 16Bit apps). Here I have to insert a line like

path=%path%;path extension

How can I escape the expression "%path%" (this is NO variable, of course). I didn't find it in the users manual (SF version 6.0.1.0).

Hayo

Lorne
05-22-2002, 09:46 AM
You shouldn't have to, unless you've assigned something to %path%.

A variable name doesn't get replaced with anything unless a value has been assigned to it. So I can write:

"What you talkin' bout, %foo%?"

And %foo% will remain just "%foo%" until I actually go and assign "Willis" to it.

LochWar
08-26-2002, 06:47 PM
I ran into a need for this type of a replacement where I already had a variable with that name assigned. I used the fact that you can assign the string to a variable with "Evaluate value as expression" checked and use syntax like

"%" + "PATH" + "%" + "<rest of your string here>"

to assign the text "%PATH%" to the variable without it getting replaced by the contents of the previously defined SetupFactory variable of the same name.

Lorne
09-30-2002, 11:37 AM
Excellent tip, LochWar.