How to Fix General Protection Fault in module WIN87EM.DLL while running Windows 7 in VMWare

Recently ran into an issue with a Windows 7 32-bit VM running in VMware Fusion on Mac OSX 10.9 (Mavericks) when running a Point of Sale application would receive a Application has caused a general protection fault in module WIN87EM.DLL. Starting doing some digging and found this thread discussing the issue at

Basically the issue is that when you try to run a legacy 16-bit application in Windows XP and above you will receive the GPF (General Protection Fault).

The Windows 80×87 emulator library, WIN87EM.DLL, works at the 16-bit-Windows level to virtualize the coprocessor among multiple Windows-based applications that run inside the system VM.

It appears to me that, with the Virtual Machine using a Virtualized Processor (not related to the above reference to “virtualized coprocessor”) as opposed to an emulated processor, the Virtual Math Coprocessor Device (VMCPD) and/or WIN87EM.DLL generate an error from the virtualized processor.

So how do we fix it. Simple enough you just have to to “hiding” the math coprocessor from the Virtual Machine, so it doesn’t go to the processor. This apparently can be achieved by using a program called WinFloat which includes a tool called HIDE87, which is suppose to hide the math coprocessor from the kernel.

Lucky for us you can download winfloat from

  • Click on winfloat.exe to download to a directory. Once downloaded double-click to extract the files.
  • Copy to c:\windows\system32 directory
  • Add lh c:\windows\system32\  as the first line to the c:\windows\system32\autoexec.nt file.
  • Reboot virtual machine

The error should now be gone. This will work with virtual machines running on Virtualbox and VMWare.




22 Responses to “How to Fix General Protection Fault in module WIN87EM.DLL while running Windows 7 in VMWare”

  1. Anish says:

    hello !
    i cannot find the file “”, after extraction process

  2. Karel van Vliet says:

    Good morning,

    I don’t understand this line. Can you explain?

    Add to lh c:\windows\system32\autoexec.nt file for the first line:

    • newlife007 says:

      I had a typo in there, thanks for bringing that up. Here is what it should say.
      Add lh c:\windows\system32\ as the first line to the c:\windows\system32\autoexec.nt file.
      The lh stands for load in high memory.

      • J.K. van Vliet says:

        Hi newlife007,
        It works great. Now I can use my old software in Virtual Box.
        I thank you very very much.

      • riki says:

        i still strugle in this line Add lh c:\windows\system32\ as the first line to the c:\windows\system32\autoexec.nt file. , what should i do actually?

        • newlife007 says:

          Find the file called c:\windows\system32\autoexec.nt on your Windows 7 install and add the line lh c:\windows\system32\ to it. Save the file and reboot the Windows 7 virtual machine. The line is telling Windows to load the file in high memory and will get rid of the error.

  3. Tanner says:

    Thanks for your steps. My issue was not with a VM whatsoever so these steps can also be used for win87em.dll exceptions running natively in win7 x86.

  4. Jignesh says:

    Thanks for the help. It worked successfully.

  5. Rafael says:

    How To Fix Win87em.dll – STEPS

    1. Download winfloat.exe from

    2. Open winfloat.exe with 7zip. Find and extract it to desktop.

    3. Copy to C:\Windows\System32\

    4. Open c:\windows\system32\autoexec.nt with notepad

    5. At top of file, after first group of comments add the following

    lh %SystemRoot%\system32\

    6. Add a comment above your last line

    REM Fix for Gen. Protection Fault in win87em.dll

    7. Save changes to autoexec.nt and reboot pc.

  6. Jadawyn says:

    Really thank you, you saved my day

  7. Adam says:

    That saved my day! Thank you!!!

  8. Masai says:

    Excellent solution!
    Thank you so much for help us saving 20000USD !

  9. James says:

    Bless you.

  10. Branden says:

    That was a really easy fix. Thank you for sharing!

  11. Pumpernickle says:

    I am so grateful for this thread! Thank you!!! I am just curious if anyone else is encountering dramatically slower responses after going through this process. The CAD program 16 bit that we have to run on an XP virtual machine is now lagging big time for each operation. Just wondering if there is a way around that.

    • newlife007 says:

      You are the first to say anything about slowness issue. Personally I have not seen it after I corrected it on a few clients.

      • Pumpernickle says:

        It is so strange. I have one Parallels Virtual Machine running Windows XP on my 2013 iMac OS SIERRA and I get not general protection fault errors…but when I moved the Virtual Machine to any other Mac in my network I get the error. Before I go through these “fix” steps everything functions lightening fast. Once I do these steps at every single step I take in the CAD program I get the hourglass and hanging? So strange.

        Do I have the pieces of code in the right areas of the auto exec file?

        @echo off

        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.

        lh %SystemRoot%\system32\

        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 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 Fix for Gen. Protection Fault in win87em.dll

        • newlife007 says:

          HIDE87 is a really old file from Windows 3.1 days and is possible, I have not tried Parallels on OS X Sierra, don’t have them to test. But I have done this on VirtualBox and VMware Fusion and not any issues. Your config looks correct with HIDE87 loading high first, does the CD driver need to load high? Try making it load normal.

  12. Jerry Daveline says:

    I downloaded the winfloat.exe file from with no problems but their is not a file.
    Their is HIDE87.ASM,HIDE87 MS DOS Appl, HIDE87.OBJ and HIDE87.MAK files. Which one should I use.

    • newlife007 says:

      Sounds like you may have the box checked on the view in Explorer. Organize > Folder and search options > View tab > un-check Hide extensions for known file types. The downloaded file has not changed and it is in there, the HIDE87 (MS Dos application) is he file you want.

  13. Trave8290 says:

    Thank you. Worked perfectly.

Leave a Reply

Your email address will not be published. Required fields are marked *