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!

2 Autoexec.bat are fighting for dominance(Win98 & Win-XP)

Status
Not open for further replies.

cgkeller

Programmer
Apr 12, 2000
200
0
0
CA
2 Autoexec.bat competing (Win98 + Win-XP) Tek-Tips Posting
----------------------------------------------------------------------------

My computer has a AMD Athlon XP 2400 processor, 1.93 GHz
And a Hard Disk Seagate 160 GB.

I had until 2 months ago a WIN98 OS and I upgraded it legally to WIN-XP.

Last week I installed l Java JDK1.4.2._09 and everything went fine.
Now, if I want to run a Java program, it runs fine. However, if I want to create a class file, let say from HelloDate.java, I type in C:\Java-CK> javac HelloDate.java and my computer balks and says:
“Javac is not recognized as an internal or external command, operable program or batch file”…..

Now, in the meantime, I found out why:
I have unfortunately 2 autoexec.bat in my system:
1. Autoexec.bat #1 from Win-98, which was transferred by WIN-XP from Win-98.
2. Autoexec.Bat #2 which is the new one in WIN-XP, and which has the path:
SET PATH=C:\;C:\Windows\Command;C:\J2SDK1.4.2_09\bin;….
And SET CLASSPATH=C:\Java-CK (for my java source files)

When I start my computer only Autoexec.bat #1 is activated, and not Autoexec.bat #2, this is why my JAVAC compiler does work, because it doesn’t see Path C:\J2sdk1.4.2_09\bin nor
CLASSPATH=C:\Java-CK.

As soon as I type at C:> c:autoexec.bat <enter> both Autoexec.bat are activated (and amalgamated into one)and my javac compiler works fine.

Now here comes my question: What should I do to delete Autoexec.bat #1 (which now in my system is called: C:\Windows\System32\Autoexec.NT ? Has that Autoexec.NT (why NT, I don’t have NT in my system) been registered in my Registry File? How can I remove it from there?

Your help will be very much appreciated.

Charles.

 
Is there actually anything in autexec.nt? Windows XP uses [if needed] autoexec.nt, not autoexec.bat.

In any event, just add the following lines to autoexec.nt:

SET PATH=path;C:\;C:\Windows\Command;C:\J2SDK1.4.2_09\bin
SET CLASSPATH=C:\Java-CK
 
NOTE: I made a mistake in my 5th paragraph, which should read:

"When I start my computer, only Autoexec.bat #1 is activated
and not Autoexec.bat #2, this is why my JAVAC compiler
does not work, because it doesn't see Path
C:\J2sdk1.4.2_09\bin nor CLASSPATH=C:\Java-CK."

I am sorry for my typo.

Charles.
 
Hello Smah:
Thank ou very much for your answer. I went to my \\AMD computer with WIN-XP and I copied the Autoexec.nt that I found under C:\Windows\System32.

This is what it says:

@echo off
REM: Name of this file: Autoexec.nt under WIN-XP - Sep.14,05

REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.
REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a
REM different startup file is specified in an application's PIF.

REM Install CD ROM extensions
lh %SystemRoot%\system32\mscdexnt.exe

REM Install network redirector (load before dosx.exe)
lh %SystemRoot%\system32\redir

REM Install DPMI support
lh %SystemRoot%\system32\dosx

REM The following line enables Sound Blaster 2.0 support on NTVDM.
REM The command for setting the BLASTER environment is as follows:
REM SET BLASTER=A220 I5 D1 P330
REM where:
REM A specifies the sound blaster's base I/O port
REM I specifies the interrupt request line
REM D specifies the 8-bit DMA channel
REM P specifies the MPU-401 base I/O port
REM T specifies the type of sound blaster card
REM 1 - Sound Blaster 1.5
REM 2 - Sound Blaster Pro I
REM 3 - Sound Blaster 2.0
REM 4 - Sound Blaster Pro II
REM 6 - SOund Blaster 16/AWE 32/32/64
REM
REM The default value is A220 I5 D1 T3 and P330. If any of the switches is
REM left unspecified, the default value will be used. (NOTE, since all the
REM ports are virtualized, the information provided here does not have to
REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.
REM The T switch must be set to 3, if specified.
SET BLASTER=A220 I5 D1 P330 T3

REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid
REM SB base I/O port address. For example:
REM SET BLASTER=A0

REM
REM *************************************************
REM ** Lines below this have been migrated from the
REM ** original Windows 98 settings.
REM *************************************************
REM

REM @C:\LETASSIG\LETASSIG.EXE @LETTERS.INI /O:DRIVEMAP.DAT /CD
REM REM: Autoexec.bat for AMD - Mar.27,05
REM REM: CHECKED on Mar 27,05: works fine
REM REM: Improved version with new path & C:\ added-Mar.25,05
REM REM: MS-DOS command prompt works now...(Mar.27,05)
REM REM: ----------------------------------------------------------------------------------------------------
PATH=C:\;C:\WINDOWS\COMMAND;C:\BRIEF;C:\BATCH;C:\ATITEC
LH DOSKEY
REM REM: Screen saver disabled: May 24,05


PATH=C:\PROGRA~1\ATITEC~1\ATICON~1;%PATH%;C:\ATITEC;C:\BATCH;C:\BRIEF;C:\WINDOWS\COMMAND;C:\;C:\WINDOWS\system32

----------------------

I don't know why there are two REM on each line. What I shall do? I'm just afraid I will bugger up my computer !

Any ideas ?

Charles.
 
Don't worry about the doubling of REM. The first one kills the line.
Your 98 version might work as autoexec.w40 , but would need to be changed from a command line prompt, probably from a boot disk. This is how multi-boot SE works in other combinations.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top