PDA

View Full Version : Insert Text Line question


Jean
01-02-2003, 01:02 PM
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?

noveltech
01-02-2003, 03:07 PM
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.

Jean
01-02-2003, 03:30 PM
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.

noveltech
01-02-2003, 05:15 PM
It adds additional line at bottom of batch file...

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

Try it! nt

Lorne
01-03-2003, 02:46 PM
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. /ubbthreads/images/icons/smile.gif 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.

Jean
01-03-2003, 03:18 PM
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