Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autoexec and environment variable problem

Status
Not open for further replies.

jefe9

Programmer
Mar 3, 2002
7
0
0
GB
I have a problem with the environment variables being set in the autoexec.bat file.

I am running Win Me (a Win98 98 Clone by Microsoft)

I have all the environment variables set in AUTOEXEC.BAT, including the PATH ; but after many tests I am convinced that autoexec.bat is not being run at all;

This is what I have set in autoexec.bat

set PATH=C:\Java\j2sdk1.4.1_02\bin;C:\orawin95\bin;C:\WINDOWS;C:\WINDOWS\COMMAND
SET JAVA_HOME="C:\Java"
SET CATALINA_HOME="C:\Tomcat\jakarta-tomcat-4.1.24"

None of these are set after startup - specifically the path environment variable starts with C:\orawin95\bin which omits the new one I put in before (the Java path)
ALso JAVA_HOME is not set at all. SO I can only deduce that the autoexec is not being run at startup.

There is ONLY one autoexec on the system
Does anyone know why this is happening?

Any help/advice appreciated

TIA

Jefe
 
Go to Start-->Run, and type in msconfig and go to Autoexec.bat. From here you can add your path.

If I am not mistaken, I dont think Windows ME uses the Autoexec.bat anymore. Not sure though.

You can also go do this from the command prompt.
 
Hello jefe9,

ME still "process" the autoexec.bat but in its own way. It will ignore what it doesn't like. As to the environment variable, I think it still accepts the instructions. So, I am surprised by JAVA_HOME not being set as you said. Do you mean CATALINA_HOME has been successfully set???

ME takes the SET instructions and stores the values in the registry under:

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\Environment]

You could check it see if the settings are there, such as:

"JAVA_HOME"="C:\JAVA"
etc

As to the PATH, maybe, it is more complicated. The application-specific paths are stored under:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\AppPaths]

Look into it and try to mimic other application's default setting see if it solve the problem. But, I am not sure Apache & tomcat get their way like this.

regards - tsuji
 
Maybe if you post the full autoexec, there may be something in there that skips or ignore things.

Marc
[sub]If 'something' 'somewhere' gives 'some' error, expect random guesses or no replies at all. Please specify details.
Free Tip: The F1 Key does NOT destroy your PC!
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top