Announcement

Collapse
No announcement yet.

How to code "%path%" as a string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to code "%path%" as a string

    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

  • #2
    Re: How to code "%path%" as a string

    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.


    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: How to code "%path%" as a string

      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.

      Comment


      • #4
        Re: How to code "%path%" as a string

        Excellent tip, LochWar.
        --[[ Indigo Rose Software Developer ]]

        Comment

        Working...
        X