PATH variable

Sony Crash bash (psx)
December 18, 2009 at 06:52:25
Specs: w98, n/a
Where do you specify to change the PATH variable on system level ?

See More: PATH variable

Report •


#1
December 18, 2009 at 08:55:33
I think we need a little more. Can you give an example of something you want to change as there are many path variables.

some other bloke...


Report •

#2
December 18, 2009 at 10:39:44
"the" PATH variable

echo %PATH%, you know


Report •

#3
December 18, 2009 at 11:18:27
This any use?
http://www.java.com/en/download/hel...

(I'm assuming W98 is similar to XP).

some other bloke...


Report •

Related Solutions

#4
December 18, 2009 at 11:40:07
That's indeed what I'm looking for, but the problem is that it is different in Windows98

Report •

#5
December 18, 2009 at 13:57:54
Windows 98 seems to install a path of c:\windows;c:\windows\command;c:\windows\system regardless of what the optional path statement says in autoexec.bat. It might include other directories as well. I'm not sure where that windows path is stored. But if you need to include other directories just modify autoexec.bat or run PATH from a command prompt. You might check this too:

http://www.robvanderwoude.com/path.php

"It was far easier for you as civilized men to behave like barbarians
than it was for them as barbarians to behave like civilized men."


Report •

#6
December 19, 2009 at 02:10:55
That's some time ago ... Autoexec ... of course ! I forgot about that one completely. Was thinking on looking in registry as well...

Changing the command line does not seem to work, as it seems that called scripts (with "START") do not seem to inheret variables set in the main window.

Well, I'll change the Autoexec, that'll do.


Report •

#7
December 19, 2009 at 05:16:27
Each instance of command.com has it's own environment that goes away once it's closed. You set something in one and try to use it in another and it's not there anymore and you wind up thinking that you've lost your mind at times.

Supposedly, one sets the Path in the Paths section of the MSDOS.SYS text file. But it only says c:\windows and/or c drive. I suspect that IO.SYS takes it further and adds to it c:\windows\command as it does other odd things all on it's own as well. For example, if you do not have a c:\windows\temp folder, IO.SYS will make one for you next time you boot to DOS or through DOS to Windows.

But for added paths, adding them into the autoexec.bat file is the way to go.

path=%path%;yourpath

will add yourpath to the ever increasing pre-existant path statement. You need to double up on the percent signs if used in a batch file to get the effect you want. The above example only works from the command line.

Lee


Report •

#8
December 19, 2009 at 05:31:17
> You need to double up on the percent signs if used
> in a batch file to get the effect you want. The above
> example only works from the command line.
>

I know that for these FOR variable, you need to do that, but I've never done that for any other, and it all works. Example:

C:\>set ABC=C:\temp

C:\>type test.cmd
@echo off

set ABC=%ABC%;C:\
echo ABC=%ABC%

C:\>test
ABC=C:\temp;C:\
C:\>test
ABC=C:\temp;C:\;C:\
C:\>test
ABC=C:\temp;C:\;C:\;C:\
C:\>


Report •

#9
December 19, 2009 at 22:24:20
tvc,

I don't know where you're going with this but you surely need to double up, as Lee says.

And before it has a chance to come up again, w9x and other DOS is utterly unlike NT.


=====================================
Helping others achieve escape felicity

M2


Report •

#10
December 20, 2009 at 05:07:55
You don't need to double percentages, when using the SET command, not in command line, not in batch ... Not sure what you do not understand in there. Just pointing that out to Melee.

Report •

#11
December 20, 2009 at 05:33:57
Hi tvc,

You're right. No need with SET.

Time for coffee.


=====================================
Helping others achieve escape felicity

M2


Report •

#12
December 20, 2009 at 11:12:11
I have coffee, thanks ;)

For as far as being relevant, I tried the same without SET, and it nicely works. To be clear, used as a command in a BATch file, like this:

PATH=%PATH%;C:\whatever


Report •

#13
December 21, 2009 at 01:51:39
I wrote this PATHADD back in the DOS 5 days. It won't add my chunk over & over; just once.

=======================
for %%P in (%PATH%) do if %%P!==C:\UTIL! goto path_OK
path C:\UTIL;%PATH%;

:path_OK
=================================
Note: In Windows you'd want to append, not prepend.


=====================================
Helping others achieve escape felicity

M2


Report •

#14
December 22, 2009 at 03:30:57
I like the check you are doing, with the FOR command, but really : this thread is about setting the PATH, and more specific, setting it inside AUTOEXEC

You can do a check, but just there, in AUTOEXEC, it's not really necessary, since the PATH you are adding, is just the one that you want to add to the MS defaults.

Logically, that would not be the case, since you are adding a custom path. So, a check, inside AUTOEXEC, is not necessary.

But I agree 100%, that a check inside anything else but a boot related script, is very nice to have.

Then you may need the FOR command, and then you need to double up the percentages. Note that we then are speaking about the FOR command, which is not the same as the SET command ... but, that is not really what you don't know.

Anyway, both on Windows and Unix and Linux, it CAN be the case that you want to prepend a path, but you must know what you are doing.


Report •

#15
August 18, 2010 at 14:52:02
Ignore this post - just testing something.

Report •

Ask Question