It was a long time ago, but I recall a similar situation in a past life. If I recall correctly, the error message itself is something of a red herring, and the real source of the problem was a lack of Environment space allocated to the 16-bit subsystem. (512 bytes comes to mind) It used to be that you could specify how much Environment space to allocate, however we don't boot with config.sys anymore. :) I believe I solved that particular instance by trimming down the entries in my PATH environment variable.
Open the Environment Variables dialog by right-clicking on My Computer, selecting Properties, go to the Advanced tab and click the Environment variables button.
Copy the PATH value from both the "User variables for {username}" and "System variables" sections into a text document for safe keeping (i.e in case you decide you want/need to restore them).
Now, examine the PATH entries in both User and System variables (which are combined to make your PATH environment variable):
- Remove any duplicate entries from your User variables since they're already specified at the higher System level,
- Convert any long paths to 8.3 notation. E.g. all instances of C:\Program Files\foo\ --> C:\PROGRA~1\foo\
- Judiciously, you may also decide to remove entries that you know are not needed. Sometimes apps will add PATH entries that you, yourself, never actually require.
These changes fixed that error message in my case. The problem was that the (old) PATH was fine in a 32-bit environment, but overflowed the environment space when shoehorned into the 16-bit subsystem. (A good follow-up question might be how to override the 16-bit subsystem's environment space, but I didn't need to resort to that in my case.)