otya128 / winevdm

16-bit Windows (Windows 1.x, 2.x, 3.0, 3.1, etc.) on 64-bit Windows
GNU General Public License v2.0
2.66k stars 152 forks source link

Dos Program Ease of Use Request #526

Open CyberTacoX opened 5 years ago

CyberTacoX commented 5 years ago

After using install.reg, launching Windows 16 bit programs is incredibly easy - double click it or run the program from a command prompt and it just plain works. Dos programs, however, need to be manually run with otvdm.exe and parameters. Could the ease of use be extended to dos programs as well? Just double-click it or run it from the command line like usual and it just plain works? (Obviously, I know things like DosBox will run a lot of dos programs better, but this would be a really nice feature to have for things that you'd rather run directly for whatever reason.)

CyberTacoX commented 5 years ago

As a follow-up, for a program run this way, if Wine can't properly run it, showing a user-friendly error message that won't baffle non-technical people might be a good idea. :-)

Anixx commented 5 years ago

I think, no. WineVDM utilizes the Windows built-in mechanism of recognizing Win16 applications that is used in NTVDM (Windows Win16 subsystem which is included in 32-bit versions of Windows). While NTVDM is not included in Win64, the mechanism for recognition Win16 application is included (it is also used to substitute Win32 installers instead of some standard types of Win16 installers).

Not all Win16 programs are recognized this way, for instance, those for Windows 1.0 can not be run using NTVDM, so Windows does not recognize them as capable of running. Thus WineVDM cannot make association with them either, like with DOS apps, even though it can run Windows 1.0 programs.

cracyc commented 5 years ago

It's ntvdm64.dll which implements this. All it is designed to do is run replacement installers for 32bit programs which have 16bit installer stubs. This functionality is hijacked by winevdm to run all 16bit programs. It just prints an error when dos programs are run. Ntvdmx64 https://github.com/leecher1337/ntvdmx64 has a shim to permit running of dos programs but it uses appinitdlls to load itself into all programs and thus is very heavy handed.

CyberTacoX commented 4 years ago

Huh. Interesting! Well, thank you for the response, that was pretty educational and I appreciate it! :-)

alexceltare2 commented 4 years ago

Just came here for the said functionality but it seems to be more complicated than it sounds to just map any 16-bit app/dos app to otvdmw.exe.