# Solved: Ms-dos, Autoexec.bat



## dekthered (Jan 26, 2004)

i am currently doing a home learning, java programming course. after finishing writing my current program i went as normal to compile the program. when i tried to do this i wasn't allowed to and was showing the following message:

'javac' is not recognized as an internal or external command, operable program or batch file.

even all the programs that had written before and were working perfectly well are now showing the above message when attempting to compile them. i was told that i might need to set up my 'Autoexec.bat' file again, which i needed to do in the very beginning of the java course. This didn't work either, when i tried i was shown the following message:

16 bit MS-DOS Subsystem
Command Prompt-EDIT C:\AUTOEXEC.BAT
C:\WINDOWS\SYSTEM32\AUTOEXEC.NT.
The system file is not suitable for running MS-DOS and Microsoft Windows application.

anybody any ideas as to what the problem is and how i can sort it?
thanks


----------



## bradly (Feb 11, 2005)

To replace your autoexec file, see here: http://techtalk.yourtechonline.com/forum_autoexec_nt.php


----------



## dekthered (Jan 26, 2004)

bradly said:


> To replace your autoexec file, see here: http://techtalk.yourtechonline.com/forum_autoexec_nt.php


i don't have the windows OS disks, but i checked my system and my computer had the i386 folder so i tried your suggestions on that method and none of them worked. i kept getting the same error:

No destination specified for: C:\Windows\i386\autoexec.nt\_C:windows.........
or for whichever command i tried.

anymore suggestions as this seem to be baffling a few people now?!!


----------



## bradly (Feb 11, 2005)

dekthered said:


> No destination specified for: C:\Windows\i386\autoexec.nt\_C:windows.........
> or for whichever command i tried.


If that's what you've been typing in, then you've missed the slash "\".

Type this in the command prompt [without the quotes - and note the single spaces]:

Windows XP:

"expand C:\Windows\i386\autoexec.nt_*[space]*C:\windows\system32\autoexec.nt"

Windows 2000:
"expand C:\winnt\i386\autoexec.nt_*[space]*C:\winnt\system32\autoexec.nt"


----------



## dekthered (Jan 26, 2004)

the only thing that i had missed out was the space. when the command was typed in(correctly) the reply on screen is: 

Expanding c:\windows\i386\autoexec.nt_ to c:\windows\sytem32\autoexec.nt
c:\windows\i386\autoexec.nt_: 860 bytes expanded to 1688 bytes, 96% increase.

but when i change to java directory and try to compile the programs the original error still appears: 

javac is not recognised as an internal or external command, operable program or batch file.


----------



## Elvandil (Aug 1, 2003)

Try running this to replace the missing files:

http://users.adelphia.net/~abraxas/dl/16bitSubsystemXP.exe

Is javac still in your path?


----------



## Bob Cerelli (Nov 3, 2002)

You should be able to just do this simply without needed any more 3rd party utilities.

If you are getting errors similar to:
The system file is not suitable for running MS-DOS and Microsoft Windows applications. Choose 'Close' to terminate the application. 

Try copying the file from \windows\repair directory to the one that is in the \windows\system32 directory.


----------



## dekthered (Jan 26, 2004)

copied the autoexec.nt file and the config.nt file from the windows\repair directory to the windows\system32 directory and i can now access the autoexec.bat but it is empty, just a blank page with the error message:

System Configuration Editor
C:\AUTOEXEC.BAT
Cannot open this file.

also there is a blank page on the C:\config.sys , just before the autoexec.bat.


----------



## Bob Cerelli (Nov 3, 2002)

You shouldn't need the autoexec.bat or config.sys files for a NT based operating system.


----------



## dekthered (Jan 26, 2004)

well i was told from my learning provider to send a copy or a screenshot of the autoexec.bat file and send it to them so they can have a look at it to see if they can find the problem. it won't let me copy what there is of the file to send anyway!!

why has this suddenly happened now? i have been doing my java programming course for well over 18 months and everything has been working fine up till now. without this problem getting sorted i can't carry on with my work.
this problem seems to have everyone baffled!!!


----------



## Elvandil (Aug 1, 2003)

Autoexec.bat is usually blank in XP. There may be other missing or corrupt system files. Try replacing all of them with this:

http://users.adelphia.net/~abraxas/dl/16bitSubsystemXP.exe


----------



## Bob Cerelli (Nov 3, 2002)

Like I said earlier, you shouldn't need the autoexec.bat or config.sys files for a NT based operating system. In fact it doesn't even use them. 

As far as to why the autoexec.nt file got corrupted, that's hard to say. But at least all you need to do is copy the one in the \windows\repair directory to the one that is in the \windows\system32 directory.


----------



## Elvandil (Aug 1, 2003)

If a program that uses autoexec.bat for initialization is installed in XP without being installed in Compatibility Mode, then autoexec.bat will be set by some of them to be parsed at logon.

You can check to see if your XP system uses autoexec.bat by seeing if the following key exists:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ParseAutoexec

If it does exist and is enabled, you will need to reinstall the program, unless you remember what the entry was so that you can reconstruct it.


----------



## Bob Cerelli (Nov 3, 2002)

So all you need to do is copy the autoexec.nt in the \windows\repair directory to the one that is in the \windows\system32 directory.


----------



## dekthered (Jan 26, 2004)

managed to get it sorted guys.

once i got the the AUTOEXEC.BAT FILE to open all i needed to do was to re-type the PATH & CLASSPATH statements for the JDK in order to locate my Java compiler & interpreter. somehow these statements had disappeared or been deleted. 
anyway sorted now!!

thanks very much for your time and effort anyway guys.
cheers.


----------



## Elvandil (Aug 1, 2003)

That's good news. Now make a backup on floppy in case you ever need to replace it (and config.sys) again.


----------

