Posted on 1997-11-30
Last Modified: 2013-12-16
> I have a problem with emm386. I have the following line in config.sys:

> device=c:\windows\emm386.exe ram
> When windows95 loads I get an error message which says:
> Either memory is insufficient to run KRNL386.EXE or the value of the
> windowmemsize entry in the system.ini file is too large. You need to run
> the setup program again.
> If I take out the ram option, windows loads fine, but I need this for the
> application that I am running.
> How can I keep the ram option and also get windows to start?

At the time the above problem I had was solved by using the AUTO option instead of RAM. Unfortunately this fixed the problem but did not allow me to load anything into upper memory, leaving only 513K of conventional free. Until recently, this was OK, but now I need at least 550k of conventional memory and would like to be able to load some stuff into upper memory (by using 'lh' in my autoexec). When I do a mem /c, the upper memory column is all 0's - even when I try using the devicehigh or lh commands.

The version of windows '95 is OSR2 or 4.00.950 B.

I have tried the following work arounds:

1. Using an older version of emm386.exe
2. Using RAM ON, instead of just RAM.
3. Trying to load smartdrv as well.

There is a suggestion on the web to upgrade to DirectX 5 but I have not tried this yet.

my config.sys looks like this:

device=c:\windows\emm386.exe AUTO

How can I utilise the upper memory area and free up more conventional memory?

Your help and suggestions would be greatly appreciated.


Philip Downs
Question by:pdowns
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
  • +3

Author Comment

ID: 1752166
Edited text of question

Expert Comment

ID: 1752167
you could try this: device=c:\windows\emm386.exe noems
That might solve the problem.
Also, you can shorten your lines: dos=high and dos=umb with dos=high,umb. But that won't solve anything, just shorter :)

Author Comment

ID: 1752168
Hi johnt

I need ems for the application that I am running, but thankyou for your comment.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 1752169
Alright. But could you try and see if Windows 95 loadds properly with that line? That would help to see what the problem is.
LVL 25

Expert Comment

ID: 1752170
PDowns, try these changes:

Attempt to load one or more of your drivers or memory resident programs from the Config.sys or Autoexec.bat files into upper memory, make sure that the Config.sys file contains lines similar to the following lines (in the following order):
device=c:\windows\emm386.exe noems
devicehigh=c:\windows\command\drvspace.sys /move
Then, try loading device drivers in the Config.sys file using the
DEVICEHIGH command instead of the DEVICE command. In addition, try loading memory-resident programs in the Autoexec.bat file using the LOADHIGH command.
If your computer is configured so that expanded memory is available and you are loading the Mscdex.exe file from the Autoexec.bat file, you can attempt to load part of the Mscdex.exe file into expanded memory using the /E switch on the Mscdex.exe command line.

The following is the command line for MSCDEX.EXE:
   MSCDEX.EXE: /D:x /M:n /E /V /L:x /S /K
The following table defines the MSCDEX.EXE command-line switches:
Switch                  Definition
/D:<device name>        - Allows you to specify a name for the device
                          driver. This name must be identical to the
                          device name used in the CONFIG.SYS file.
/M:<n>                  - Specifies the number of sector buffers used
                          to cache the path table of a CD-ROM disk.
                          Typically, each drive should have a minimum
                          of four to five buffers. The larger this
                          number is, the less your computer will have
                          to read directly from the CD-ROM drive.
/E                      - Tells MSCDEX.EXE to use expanded memory if
                          your system is using expanded memory.
/V                      - Displays information on memory usage
                          when you boot your PC.
/L:<drive letter>       - Allows you to specify the letter you want
                          to assign to the first CD-ROM drive.
/S                      - Allows the CD-ROM to be shared on MS-NET
                          based systems.
/K                      - Tells MSCDEX.EXE to use any KANJI
                           (Japanese) file structures, if present, rather
                          than the default of alphanumeric file structures.

Here are some other Config.sys commands that help preserve conventional memory:
You can also load TSRs high from the custom Autoexec.bat file, with the following syntax:

If you would like, paste your config.sys and autoexec.bat and we will go through them here with you!

Need more, just ask!


Author Comment

ID: 1752171
The computer will not run windows with the NOEMS switch ie:

device=c:\windows\emm386.exe NOEMS

I get the same error message as when I use the RAM option:
Either memory is insufficient to run KRNL386.EXE or the value of the windowmemsize entry in the system.ini file is too large. You need to run the setup program again.

THe only way I have been able to get windows to load is by using the AUTO option (or not loading emm386 at all).

BUT, when I use the AUTO option I am unable to load high any drivers. A mem /c ouput:

Modules using memory below 1 MB:

  Name           Total           Conventional       Upper Memory
  --------  ----------------   ----------------   ----------------
  MSDOS       33,840   (33K)     33,840   (33K)          0    (0K)
  HIMEM        1,168    (1K)      1,168    (1K)          0    (0K)
  EMM386       9,856   (10K)      9,856   (10K)          0    (0K)
  VIDE-CDD     5,040    (5K)      5,040    (5K)          0    (0K)
  IFSHLP       2,864    (3K)      2,864    (3K)          0    (0K)
  WIN          3,648    (4K)      3,648    (4K)          0    (0K)
  PROTMAN        400    (0K)        400    (0K)          0    (0K)
  ELNK3       10,224   (10K)     10,224   (10K)          0    (0K)
  WORKS       12,000   (12K)     12,000   (12K)          0    (0K)
  NDISHLP      2,016    (2K)      2,016    (2K)          0    (0K)
  vmm32       16,208   (16K)     16,208   (16K)          0    (0K)
  PROTMAN      2,560    (3K)      2,560    (3K)          0    (0K)
  REDIRECT     8,304    (8K)      8,304    (8K)          0    (0K)
  PDREMOTE     2,656    (3K)      2,656    (3K)          0    (0K)
  DOSKEY       4,688    (5K)      4,688    (5K)          0    (0K)
  MSCDEX      28,032   (27K)     28,032   (27K)          0    (0K)
  COMMAND      7,392    (7K)      7,392    (7K)          0    (0K)
  Free       504,288  (492K)    504,288  (492K)          0    (0K)

Memory Summary:

  Type of Memory       Total         Used          Free
  ----------------  -----------   -----------   -----------
  Conventional          655,360       151,072       504,288
  Upper                       0             0             0
  Reserved              393,216       393,216             0
  Extended (XMS)     15,728,640    14,680,064     1,048,576
  ----------------  -----------   -----------   -----------
  Total memory       16,777,216    15,224,352     1,552,864

  Total under 1 MB      655,360       151,072       504,288

  Total Expanded (EMS)                  1,048,576 (1,024K)
  Free Expanded (EMS)                   1,048,576 (1,024K)
  Largest executable program size         504,256   (492K)
  Largest free upper memory block               0     (0K)
  MS-DOS is resident in the high memory area.

Any further suggestions?
LVL 25

Expert Comment

ID: 1752172
Well PDowns, I understand everything that you posted, however did you make the recommended changes or are you relying up previous experience. You will note that I requested that you post your config.sys and autoexec.bat file here so that they can be reviewed. Something is obviously loading incorrectly, however posting your results from mem/c shows us nothing but what is consuming memory. There is, unfortunately, an order of the ways things should load. If you don't want to take the recommendations and/or post the files, that's one thing, but we need to ascertain whether its a load problem, software problem or hardware problem. The place to start is with the files that may be causing the problem. It would also be helpful if you posted your system basics, CPU type, memory amount etc.

Author Comment

ID: 1752173
Yes, I made the recommended changes.

The PC in question is a clone, Intel Pentium 166 Mhz, 16MB mem.

The autoexec.bat:

c:\windows\net start
lh \megasoft\works\redirect
lh \megasoft\works\pdremote

The config.sys:

device=c:\windows\emm386.exe AUTO

there is no CD rom in this PC.
LVL 25

Expert Comment

ID: 1752174
PDowns: Here's some changes to make:


REM c:\windows\net start

**Presumes that Megasoft is on drive "C".


**If there's only one drive, you can omit the "Lastdrive" entry

Let me know how you make out with these changes!

Expert Comment

ID: 1752175
I don't understand this:
1) why si "set temp=c:\temp" before "@echo off" ?
2) why is there a REM line? Tha's far from indispensable!
3) What's megasoft?
LVL 25

Expert Comment

ID: 1752176
Hi JohnT: In response to your comments:

1. I used the set temp to enable us to track a windows dump file for tmp's etc rather than windows/temp

2. Net Start doesn't need to be called from a command line in autoexec.bat, and it could be creating part of the problem we're see. See MSKB Q134595 (among others). We need to recreate an operable system and then add back what's necessary. A real mode network driver can be replaced by a protected mode driver, and if they are both being called, then there are problems.

3. I have no idea what megasoft is, no doubt PDowns will tell us if it needs to be called here!



Author Comment

ID: 1752177
OK, here's the deal

I had a suggestion from another source to try loading Windows without emm386.exe at all. Previously I had not tried this because on other PC's i was not able to use EMS. But, on this PC it works fine, '95 allocates it OK.

My problem has changed slightly, I can run my DOS application from the dos prompt window OK, but when I setup a shortcut on the desktop to run the application, it does not work.

I have tried to set the Properties/Memory for this shortcut the same as for, but this didn't work (the settings are all at AUTO). I have also tried to set the conventional mem to 52oK but this didn't work either.

If I can run this program from the DOD prompt OK, shouldn't it be straight forward to run it from the desktop?


Expert Comment

ID: 1752178
I post this answer as comment:
when you open properties for shortcut, make sure that working
directory is set to the same location where your application is.

LVL 14

Accepted Solution

smeebud earned 200 total points
ID: 1752179
Read this please. Where it referes to OSR2 does not mean that this doesn't work for earlier version.
If you are using the EMM386 memory manager with the NOEMS or RAM switch, your upper
memory and extended memory is lost when restarting in DOS mode. All drivers and devices then
load into low memory (causing a shortage of low memory). Here's a sample config.sys line which
causes the bug.
Solution: None.
Workaround: Some users appear to not have this problem at all, for whatever reasons. There seem
to be users the suggestion works for, and users the suggestion doesn't work for. So, here they are:
Suggestion 1: Use an older version (previous Windows95 or DOS version) of EMM386.EXE.
Suggestion 2: Use the AUTO switch instead of NOEMS or RAM.
Suggestion 3: Make sure you load SMARTDRV as well.
NOTE: The SMARTDRV option is a topic of great debate; Experiment.
Suggestion 4: Use the RAM ON switch instead.
Suggestion 4: Do not allow the doublespace driver to load.
Suggestion 5: Upgrade to DirectX 4 (DirectX 2 is bundled with OSR2).
Suggestion 6: Use the "MS-DOS Prompt" icon/.pif instead of booting/restarting to DOS. Customize
the settings of this .pif.
Fun, 32-Bit Style Game users, listen up!
For maximum DOS memory in an MS-DOS session, add the line LocalLoadHigh=1 to the [386Enh]
section of SYSTEM.INI. Players of Duke Nukem 3D and Quake-or anyone who plays a game that
uses 32-bit DOS extender software-will reap the benefit of that much more memory.
Low Free Conventional Memory with OEM Service Release 2
There is so much information on memory and OSR2 that I couldn't put it all here. Do this please;
Go to;
At Step 1: Choose Windows 95
At Step 5: Enter as a Search Phrase "msdos.sys and memory"
New in OSR2 is support for Hard Drive/CDROM Direct Memory Access. With DMA enabled, no
processor time is used to access the hard drive or CD ROM. The result is an improvement in overall
system performance. However, the default for DMA is disabled (for the default OSR2 Bus
Mastering IDE controller drivers)!
Note that varying hardware configurations will show varying improvements in system performance
when DMA is enabled.
To enable HD DMA, go to Control Panel > System > Device Manager > Disk Drives. Highlight
your hard drive, click properties. Click the "settings" tab. Check the box next to "DMA." Restart the
system when prompted, and repeat for any additional hard or CD ROM drives.
NOTE that the DMA checkbox only appears 1) for IDE drives, and 2) only if the default OSR2 bus
mastering IDE controller drivers are installed and configured correctly. Some IDE drives do not
support Bus Mastering. To determine if your hardware supports Bus Mastering, do the test
described at
OSR2 supports Bus Mastering, but only by checking the DMA box, is Bus Mastering turned "on."
Note that the DMA check box only appears when using the default Windows95 OSR2 Bus Master
drivers. If you are using non-bus mastering drivers, the DMA box won't show up because Bus
Mastering cannot be enabled. If you are using other Bus Mastering drivers, the DMA box does not
show up because it is enabled by default, and you don't have the option of disabling Bus Mastering.
More free memory in DOS windows:
1. Add LocalLoadHigh=1 to the [386Enh] section of
Warning: this may cause unpredictable results if you are not using
the EMM386 memory manager.
Remove DoubleSpace/DriveSpace from memory:
2. Whether or not you're using the DoubleSpace/DriveSpace disk
compression utility, these drivers are taking up valuable memory
and slowing system startup.
3. Simply delete DRVSPACE.BIN and DBLSPACE.BIN from
C:\ and your Windows\Command directory. Note: do not do this if
you are currently using DriveSpace or DoubleSpace to compress
your hard disk!!
Load DosKey in a DOS box automatically:
4. Right-click on DOSPRMPT.PIF (in your Windows directory),
and select Properties.
5. Click on the Program tab, and enter "DOSKEY" in the field
labeled Batch File. (FYI, I use Keyboost, an antique version of
6. Note: for more information, see Contents of the Windows95
Note: some of these settings can also be changed with TweakUI,
one of Microsoft's PowerToys. Warning: several users have
reported problems with this utility - use with caution.
Memmaker is on your CD. It still works.

LVL 25

Expert Comment

ID: 1752180
You say that when you setup tis program to run from the desktop, it doesn't work. Could you be a little more specific in what your seeing. Does an error occur? Does it just not start?

Expert Comment

ID: 1752181

Just a thought:
Why do you need to load an Autoexec.bat or config.sys??
If you need any DOS programs why don't you set their own environment in forcing each one to use it's own config.sys and autoexec.bat settings.

Did you try that?? Like you create a shortcut for that application then right click on it then in the programs TAB you set it to use the configuration you set for it in MS DOS environment.

You said that without EMM386 your computer boots fine but you have no UPPER memory left, and that would be cured the way I'm suggesting here, since it was not offered by no one.

Keep me posted, if my solution is helping.


Author Comment

ID: 1752182
thanks smeebud, I had tried all of these things except the one about deleting drvspace.bin from the windows directory. - I did this and it gave me the extra mem I needed.
LVL 14

Expert Comment

ID: 1752183
Ya never know what it's gonna be.
Thanks for the good grade.

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

726 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