1) While the amount of memory for DOS applications can be specified in PIF editor,
for both Standard and Enhanced mode, it is of little help if there's not enough RAM left for the application. A C++ compiler likely won't run in, say, 256KB of memory. 🙁
2) I had to completely disassemble my SLT 286 to get to the RAM slot.
If there is a slot that that's easily accessible, maybe a memory module from eBay can be installed. I've seen many of my old laptops there, often sold as broken or as-is.
3) As I mentioned before, Windows 3.x needs contiguous memory to properly work.
Especially below 1MB. Under such extreme conditions,
Windows likely can't swap in and out anymore.
Also, Windows and non-Windows applications are handled slightly different, I vaguely remember.
Also, running Enhanced mode with less than 2MB is no official configuration.
As already mentioned, Windows will fall back to Standard mode automatically, if less than a 2MB are installed (unless forced by Win /3)..
Personally, I think it's a miracle that Windows went this far at all.
Edit: Since you're apparently a programmer (C++ compiler),
I was assuming that you know how to configure WfW..
For advanced features to work, you'll have to have both 32BitDiskAccess and 32BitFileAccess in Virtual Memory dialog to be enabled (incl. permanent swapfile).
The 32BitDiskAccess (aka FastDisk) is disabled on laptops, by default, in order to not corrupt data due to proprietary power-savings technologies. Also, it was written for MFM/RLL era controllers, not really IDE.
For modetn IDE drives, something like the MicroHouse driver is required.
See http://win31.de/edrivers.htm
Edit : There's a workaround. If you need a console only, you can try programs like "WinCLI".
They simulate a DOS console and have useful extra commands included. They also can execute programs. Since these consoles are essentialy Windows programs, they should not be affected by this error message.
Edit: I searched my old backups for you and finally found a shareware copy of WinCLI.
From what I can tell after a few tests, it can indeed execute both Windows and DOS programs. And handles paths with both \ and / as separators.
Runs on Windows 3.0, even!
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel
//My video channel//