> 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
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pdownsAuthor Commented:
Edited text of question
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 :)
pdownsAuthor Commented:
Hi johnt

I need ems for the application that I am running, but thankyou for your comment.
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Alright. But could you try and see if Windows 95 loadds properly with that line? That would help to see what the problem is.
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!

pdownsAuthor Commented:
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?
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.
pdownsAuthor Commented:
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.
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!
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?
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!


pdownsAuthor Commented:
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 command.com, 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?

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.

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; http://www.microsoft.com/kb/default.asp
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 http://www.microsoft.com/kb/articles/q159/5/60.htm.
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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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?

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.

pdownsAuthor Commented:
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.
Ya never know what it's gonna be.
Thanks for the good grade.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.