Remove COUNTRY command form CONFIG.SYS and restart computer

Posted on 2004-09-29
Last Modified: 2013-12-29
Could someone please help!

I have a Japanese laptop running windows98 (se) (Japanese version).
After installing and then removing a network card. I restarted the computer.

Now when I turn on the computer it stops loading and says:

Cannot run windows with current code page
Remove COUNTRY command form CONFIG.SYS and restart computer.

And goes to a c:\> prompt

Now from here if i type: edit c:\config.sys it loads for a second then
Goes to another c:\>prompt <--- which means i cannot edit the config.sys

So I restart the computer and press F8.
If I try and run safe mode I run into the same problem.
'Can not run windows with current code page
Remove COUNTRY command form CONFIG.SYS and restart computer.'

So I select to run a "Step-by-Step confirmation"
If I press yes to all I will run into the above problem however if I say no to the option (which is found in config.sys):
It then still says the above problem exists but i can now use edit c:\>config.sys
However to my surprise there is nothing in the config.sys file that says anything about COUNTRY.

But in the autoexec.bat file there is line that stats the following:
loadhigh c:\windows\COMMAND\nlsfunc.exe c:\windows\country.sys

I have checked out the following threads in EE but non of the given solutions worked:'t%20run%20windows%20with%20current%20code%20page&searchType=null

I would like to get my hands on a Japanese version of a boot disk, to see if this might help.

Any help please, I have spent the last 4 days trying to figure this out grrrr.

Thank you

Question by:skezo
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 3
  • +4
LVL 59

Expert Comment

ID: 12186253
I found this page on the nlsfunc.exe command and country.sys:

I would suggest you edit your autoexec.bat file to put the letters REM followed by a blank (space) in front of the line there (making it a REMark, or comment, and thus not executable.)  Then edit config.sys as explained on the above page, and see what happens.  Also, can you try editing the country.sys file to see if it is a straight ASCII file?   (I'm not at a Win98 machine now that contains this file, so I cannot check for myself...)

Author Comment

ID: 12186381
Maybe I have lost my mind but I seem not to be following this.

i put an REM in front of the loadhigh c:\windows\COMMAND\nlsfunc.exe c:\windows\country.sys in autoexec.bat

And from what i could figure out from the above link i added this line to the config.sys:
is that correct/ i am a little lost sorry?

With regards to the country.sys being a straight ASCII file i am not sure. i was able to run an edit c:\windows\country.sys but the contents was gibberish as it should be displaying Japanese but isn’t. It seems to be using windings or a font like that.

Author Comment

ID: 12186390
also just forgot to say that after doing the above i tried to run windows98(se) but was still confronted with:
Cannot run windows with current code page
Remove COUNTRY command form CONFIG.SYS and restart computer.
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

LVL 32

Expert Comment

ID: 12186765
Have you tried   scanreg /restore  or   /fix   ?
If it doesn't want to run, try just   scanreg
from DOS:
go to C:\WINDOWS\COMMAND to run it.


Expert Comment

ID: 12186988
This can be real simple.
First get to the c:\   prompt.

Type the command   "type config.sys"   (without the quotes) to see what is in config.sys.  Write it down if you can see anything.

Type ren cconfig.sys config.old    (This renames config.sys so the old one will not be used)

To recreate config.sys without running Edit, do this.

Ath the C:\   prompt, type:           copy con config.sys              (this will allow you to copy from the console (the keyboard) into the new file
                                                                                             named config.sys)
Type the commands you saw in when you did the "Type config.sys".
Press "Enter" between each line.  You can not go back up if you make a mistake.
Hold the ctrl key and press the "Z" key, and it will write the file to the hard drive and report "1 file copied".  You now have a new
If you make a mistake, just do it again.  At the second try, it may ask "Overwrite existing file", type y for yes.

Your existing config.sys file may be corrupted.  By renaming the old file, you will be using another area on the hard drive, just in case you
are dealing with a bad spot on the hard drive.   I also suggest you run scandisk to check with hard drive problems. A messed up directory or FAT
may be the reason that you can not use Edit.

LVL 38

Expert Comment

ID: 12187289
What exactly do your config.sys and autoexec.bat files contain?

2 ways of getting them, given that you obviously have a functional computer to have posted your question:

Method 1.

1. Boot to a win98 boot floppy (if you don't have one, see my notes a bit down the page).
2. Choose "No CD-Rom Support" as you won't need access to your Windows CD right now
3. When it gets to the A:\> prompt, remove the boot floppy and insert a blank one
4. Type the following commands one after the other, pressing the <enter> key after each

copy  c:\config.sys   a:\config.txt
copy  c:\autoexec.bat  a:\autoexec.txt

If, for some reason an error message tells you that it can't do this, you might have to change the file attributes, so find out what they are first with the following commands:

attrib  c:\config.sys
attrib  c:\autoexec.bat

If either of them show an H, R, or S below the command, take note of this.

To remove an attribute, just type the commands below to remove the Hidden, Read-Only and System attributes.  Obviously you only want to remove the attribute displayed for that file, so it it showed as only H, then only use the -h  part in the command.

attrib  -h  -r  -s  c:\config.sys
attrib  -h  -r  -s  c:\autoexec.bat

That would allow you to copy the files to your blank floppy disk.

To restore the files' attributes to what they were, just type the same command but replace the - in front of the h, r, and/or s to add it to the file again.

Just power off and remove the floppy from the computer.

Now you have 2 copies on a blank floppy that you can copy and paste here for us to look at.

Method 2.

1. Just as your computer is starting up, jab the F8 key repeatedly until you are shown a boot menu
2. Choose "Command Prompt" and it will quickly show the C:\> Prompt
3. Follow the copy commands detailed above to copy the files to a blank floppy
4. Remove the floppy and power off.

To create a boot floppy from DOS depends on whether you have the folder "c:\windows\command\ebd" present on your computer.

Boot to DOS using Method 2 steps 1 and 2, then type the command:

dir  /on  /ad  /b  c:\windows\command

It should show something similar to the following (including the command you typed)  from which you will see that the "ebd" folder exists:

C:\>dir /on /ad /b  C:\WINDOWS\COMMAND

IF SO, then just insert a blank floppy and type the following commands in sequence:

cd  windows
cd  command

That should launch BOOTDISK.BAT which will prompt you for the drive letter of your floppy drive.  Type in the number that corresponds with your A:\ Drive and then allow the boot floppy to be created.

An example of my config.sys and autoexec.bat files shows the English British codepage is set to load:

mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi)
mode con codepage select=850
keyb uk,,C:\WINDOWS\COMMAND\keyboard.sys

device=C:\WINDOWS\COMMAND\display.sys con=(ega,,1)

That means that it is loading codepage 850.  Japanese will be different, as will English US which is 437 I think.  Note also that it specifies a UK Keyboard, which will match up with the character set.  044,850 is English British.

You obviously have to know the different codes to know what yours is currently set as, hence my reason for asking you to paste the contents of those 2 files here.

For your Info, there is a tool on your Win98 CD that is designed to allow you to change the code pages.  It is named "chdoscp.exe"  (Change DOS Code page) and is in the \tools\reskit\config\chdoscp folder.  The codepages and DOS .FON files (fonts) are in the sub-folder thereof named (appropriately) "codepage".

This is just for your advanced information in case it might help you to resolve this problem.

I have a feeling that you might find that Japanese uses Unicode or ISO characters for the codepages, but we'll see what your files say.

Author Comment

ID: 12188176
thanks for the suggestions so far, sadly all with no luck. also BillDL i cannot access windows98 that is the problem when it is loading it stops and stats:
Cannot run windows with current code page
Remove COUNTRY command form CONFIG.SYS and restart computer.

I am on my desktop right now trying to fix this laptop. Below are the copies of my autoexec.bat and config.sys


REM [Header]
REM loadhigh c:\windows\COMMAND\nlsfunc.exe c:\windows\country.sys

REM [CD-ROM Drive]

REM [Miscellaneous]

REM [Display]

REM [Sound, MIDI, or Video Capture Card]

REM [Mouse]


device=c:\windows\EMM386.EXE RAM X=C000-CFFF
devicehigh=c:\windows\jfont.sys /p=c:\windows
devicehigh=c:\windows\jkeyb.sys /106 c:\windows\jkeybrd.sys
REM [Header]

REM [CD-ROM Drive]

REM [Miscellaneous]

REM [SCSI Controllers]

REM [Display]

REM [Sound, MIDI, or Video Capture Card]

REM [Mouse]
REM ------------------


Author Comment

ID: 12190129
anybody have any thoughts?

Assisted Solution

caza13 earned 200 total points
ID: 12193762
Rename the autoexec.bat file to autoexec.old .
Rename the config.sys file to config.old .
Use the text editor to create new autoexec.bat and config.sys files, but leave them empty.
See if you can start Windows with the new autoexec.bat and config.sys files.  Windows 98 doesn't normally need these files to start.  They are used for compatibility with DOS programs.

Author Comment

ID: 12194328
still get the following statement:
Cannot run windows with current code page
Remove COUNTRY command form CONFIG.SYS and restart computer.

but also now 'File Creation error'

LVL 38

Assisted Solution

BillDL earned 200 total points
ID: 12196081

>>> I cannot access Windows98, that is the problem. When it is loading it stops and states..." <<<

That was my reason for suggesting that you boot to a Win98 Boot Floppy.  This loads its own "codepages" and sets them even in the absence of ANY oprating system.

You have some custom .sys files loading from config.sys that I assume allow the system to use japanese.

Are the files present on your system?

c:\windows\biling.sys  (Bilingual support?)
c:\windows\jfont.sys (Japanese font support?)
c:\windows\jdisp.sys (Japanese display support?)
c:\windows\jkeyb.sys (Japanese Keyboard support?)

None of these files are present on an English version of Windows 98 CD, even though multilanguage options may be available.  I can only assume that they are either native to your Japanese version of Windows, or have been installed by 3rd-party utilities.

If the files are NOT present on your system, then the following command issued from the command prompt, after booting to a Win98 boot floppy, will extract them from your Windows CD and dump them into c;\windows\system:

EXTRACT  /A   x:\win98\BASE4.CAB   filename.sys  /L  c:\windows\system

where x:\ is the letter of your CD-Rom Drive and filename.sys is the file you wish to extract from the CD.

For your Info, the config.sys line that refers to Panning.sys, is loading the Toshiba Laptop "Panning Support Driver" for what is usually the Trident graphics chip.  This is normal.

I wonder why you have such a large gap in your autoexec.bat file.  Although this probably wouldn't interfere with running it, I suggest using DOS Edit to condense it a bit.

You have a line in your config.sys file:


932 is the Japanese codepage, so this is correct if that is what you wish to load:

Japanese, Chinese and Korean all use what are known as "DBCS (Double Byte Character Set) Codepages" rather than the "SBCS (Single Byte Character Set) Codepages" that most other languages use.  The character set for Japanese codepages are used as both Windows ANSI and OEM codepages, so loading ANSI.SYS from config.sys looks OK to me.

Here's a list of the common codepages used by other languages:

The codepages available to your Windows installation will be listed in the registry key:


and the various sub-keys Addlocales, Codepage, Language, and Locale.

Here's an example of a .reg file exported from my English version:





"00000413"="Dutch (Standard)"
"00000813"="Dutch (Belgian)"
"00000409"="English (United States)"
"00000809"="English (British)"
"00000C09"="English (Australian)"
"00001009"="English (Canadian)"
"00001409"="English (New Zealand)"
"00001809"="English (Ireland)"
"00001C09"="English (South Africa)"
"0000040C"="French (Standard)"
"0000080C"="French (Belgian)"
"00000C0C"="French (Canadian)"
"0000100C"="French (Swiss)"
"0000140C"="French (Luxembourg)"
"00000407"="German (Standard)"
"00000807"="German (Swiss)"
"00000C07"="German (Austrian)"
"00001007"="German (Luxembourg)"
"00001407"="German (Liechtenstein)"
"00000410"="Italian (Standard)"
"00000810"="Italian (Swiss)"
"00000414"="Norwegian (Bokmal)"
"00000814"="Norwegian (Nynorsk)"
"00000416"="Portuguese (Brazilian)"
"00000816"="Portuguese (Standard)"
"0000040A"="Spanish (Traditional Sort)"
"0000080A"="Spanish (Mexico)"
"00000C0A"="Spanish (Modern Sort)"
"0000440A"="Spanish (El Salvador)"
"0000480A"="Spanish (Honduras)"
"00004C0A"="Spanish (Nicaragua)"
"0000500A"="Spanish (Puerto Rico)"
"0000400A"="Spanish (Bolivia)"
"0000042F"="Macedonian (FYROM)"
"0000100A"="Spanish (Guatemala)"
"0000140A"="Spanish (Costa Rica)"
"0000180A"="Spanish (Panama)"
"00001C0A"="Spanish (Dominican Republic)"
"0000200A"="Spanish (Venezuela)"
"0000240A"="Spanish (Colombia)"
"0000280A"="Spanish (Peru)"
"00002C0A"="Spanish (Argentina)"
"0000300A"="Spanish (Ecuador)"
"0000340A"="Spanish (Chile)"
"0000380A"="Spanish (Uruguay)"
"00003C0A"="Spanish (Paraguay)"
"00002009"="English (Jamaica)"
"00002409"="English (Caribbean)"


Note that my registry has reference to the Codepage files for Japanese (932) as follows:


But it doesn't appear in "Locale" and I assume from this that it would be impossible for me to be able to add Japanese as a language to which I could switch to at any time without adding extra files to my system.  These .NLS files are found in your C:\Windows\System folder.

Double check that your system has this file in c:\windows\system by booting to your Win98 boot floppy, navigating to the windows\system folder, and issuing the command:

dir /on /b *.nls

To output the listing to a floppy disk as a text file named nlsfiles.txt, use this:

dir /on /b *.nls > a:\nlsfiles.txt

Boot to your Win98 boot floppy, change drive, and then change directory to your Windows folder.   Export the relevant registry key to a text file on the floppy so that you can examine it on another computer:

regedit  /e  a:\nlskey.txt  HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Nls

Here's some very pertinent information concerning the japanese .sys files that are supposed to be loading on your system:

Keyboard Drivers for Japanese Windows98 download links:

Of course, the advice given on the above page relates to allowing an English version of Windows to work with Japanese content.  The problem is that I can't read Japanese, so what seem to be helpful pages found in google don't mean a thing to me.

regarding your line in config.sys:


try remarking it out just to see what happens:


I'm not positive about this, but I have a feeling that it should specify a filename.sys rather than [932].  references state that this should be "country-filename".

The default value for [drive:][path]filename is defined by the COUNTRY command in your CONFIG.SYS file. If no COUNTRY command exists in CONFIG.SYS, Nlsfunc looks for COUNTRY.SYS in the root directory of the startup drive. Nlsfunc does not access the COUNTRY.SYS file until the operating system requests information from it. If the operating system cannot find the COUNTRY.SYS file when you install Nlsfunc, no error message is given.



Specifies the country code (JPN?)
Specifies the character set for the country (932?)
Specifies the location and name of the file containing country information (country.sys?)

(Reference for country code and codepage:

See Examples of use:

To use the default country-specific information found in the COUNTRY.SYS file, type:

Related Info:


Expert Comment

ID: 12196124
Ok, rename the files back to what they were before.  It may be that the Japanese installation has been partly removed.  Here is a link to where you may be able to find the resources to reinstall it.

For Windows98 to recognize the Japanese 106-keyboard (A01) layout:
LVL 38

Expert Comment

ID: 12196268
Snap!  I see you found the same site, caza13.

Expert Comment

ID: 12196752
Yes, thanks to Google.  I think the error message is misleading.  It looks like someone may have already removed the "country=" command from the config.sys file.  They may have removed some other things as well.  It is obvious now that the problem goes deeper than the autoexec.bat and config.sys files.  The Japanese language features have been installed in Windows 98, and the registry has been modified.

Accepted Solution

maiaibing earned 100 total points
ID: 12207104
Seems your display wants and needs a driver. In order to write Japanese characters, the screen probably uses a special set of double-coded ascii-characters (as in Chinese etc.) to create nice looking Japanese characters.  (I worked in China for five years.)

Windows is not loading, because the screen needs a specific driver reference to start up. My guess is that you have deleted the correct driver reference that used to be in your autoexec.bat and/or config.sys-files. This would also be consistent with the way the error message responds.

If so - you are not very likely to be able to fire windows up without the correct reference file - no matter what you tweak in the registry.

I would start hunting an original autoexec.bat and config.sys file "out there" on the Internet. Or try to get in touch with the manufactuer (joke from the Far East) or someone who has the same type of laptop.

Author Comment

ID: 12254063
well thanks all for the help, as i thought the solution was with a "Japanese version boot disk".

for reference you can download a version here:

as you all worked hard i decided to split the points.
LVL 38

Expert Comment

ID: 12254889
Thank you, skezo.  very glad that you have resolved the problem.

I notice from the boot menu:

that Japanese speakers must read from bottom to top, judging by the reversed options.  Help is normally at the bottom in English versions :-)

I downloaded the boot floppy creation file just in case I ever happen upon a problematic japanese Win98 installation (highly unlikely, I'm happy to say):

You know, the site was one that came up in my searches, and I'm sure I recall that page, but my lack of Japanese know-how prevented me from investigating further.  Glad you knew what it all meant.

I notice immediately, after unpacking the download, that it loads the fonts:


as well as the .SYS files mentioned in earlier comments:


The only thing that the boot floppy is missing is the "" file that contains the files that would normally be unpacked into the temporary "Drive" referred to as %RAMD%.  In fact, this is completely missing from autoexec.bat because this boot floppy is intended for an OEM version of the Windows 98 Install CD.

The :AUTOSETUP label in autoexec.bat runs the setup file "%CD%\win\OEMSETUP.EXE" rather than the usual "%CD%\win98\SETUP.EXE".

In the absence of an file to unpack, the following DOS commands are NOT accessible:


Anyway, this has digressed and is only included in case somebody finds this page and thinks that it is a full Win98se boot floppy rather than a cut-down one to support  Japanese.

I think I'll use some of the files and modify it for a laugh  :-)


P.S.  Next time you see someone with one of those fashionable Japanese tattoos like "Robbie Williams" and probably the "Red Hot Chilli Peppers", check out this site and you might be surprised at the Kanji to English translations of the text on their arms:

I reckon some of these guys have unwittingly allowed the tattoo artists to have the last-laugh:

Have fun, and don't forget to compare your tattoos :-)

LVL 38

Expert Comment

ID: 12254936
Having examined the Windows ME version, however, I notice that this one would be the appropriate one to use for Windows 98 or SE:

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Determining the an SCCM package name from the Package ID
Configuring Remote Assistance for use with SCCM
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question