Announcement

Collapse
No announcement yet.

Insert Text Line question

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

  • Insert Text Line question

    I want to add the default %AppDir% to the autoexec.bat file. The problem I see is that part of this uses the % and that is also part of the variable.

    SET PATH=%PATH%;%AppDir%

    So how to I do this?

  • #2
    Re: Insert Text Line question

    This works for me.

    Actions/Text Files/Insert Text Line

    File Name: C:\autoexec.bat
    Insert New Line: -1
    Line to Insert: path = %AppDir%

    Should work for you. nt

    Added note; I think it would be better, to include the paths in the shortcuts created instead of editing the autoexec.bat file.

    Sometimes, Windows will REM out autoexec lines. Just a thought.

    Comment


    • #3
      Re: Insert Text Line question

      Your post looks like you would be removing all other paths that might be in your PATH enviorment variable. I want to set the path so we can run from a DOS prompt if we need to and not clear out other paths that are set in the process.

      Comment


      • #4
        Re: Insert Text Line question

        It adds additional line at bottom of batch file...

        I do not believe you can overide the windows path file.

        Try it! nt

        Comment


        • #5
          Re: Insert Text Line question

          If it's on Win9x, you could use SET PATH ADD instead.

          Or, just edit the original path line (instead of adding another line that refers to the existing %PATH% environment variable).

          I'm not sure I understand what the problem is, though. [img]/ubbthreads/images/icons/smile.gif[/img] You said:


          The problem I see is that part of this uses the % and that is also part of the variable.
          Can you explain that some more? What part uses the %? Why do you think it using a % will pose any problems?

          Unless you're using %path% as a variable in AutoPlay, you should be able to output it into the SET statement fine.
          --[[ Indigo Rose Software Developer ]]

          Comment


          • #6
            Re: Insert Text Line question

            Now that I have played with this I see that I did not have the problem I thought I had. The % works fine. In fact I have it all working great now.

            Thanks

            Comment

            Working...
            X