Jump to content

What is needed to start windows app from command prompt window in windows me.


PDU

Recommended Posts

I stripped down the windows me installation. I made a very tiny installation of Windows ME, even without registry.

The WINFILE, PROGMAN, TASKMAN and NOTEPAD works well when they are started from the PROGMAN or WINFILE.

But, when I tried to start them from command prompt. I got error messages like "This program can not be run in DOS mode". See the attached screenshot for details.

How to solve this and restore the normal Windows ME behavior? (Notepad should run if your type notepad in the command prompt window)

I know I stripped too much. What is the minimum requirement for restoring this. I guess this may be related to some registry settings, what are the minimum registry settings needed.

BTW, the explorer.exe does not work. Seems like some registry settings are needed.

 

20220221-165857-137.png

Link to comment
Share on other sites


I tried that "start notepad.exe". It does not work.

I also tried to change the settings "Prevent MS-DOS-based programs from detecting Windows". By unchekcing that, the error message become

can not execute XXXXX, like attached.

strat notepad.exe from the progman always works. But it does not start from command prompt.

 

20220222-153821-766.png

Link to comment
Share on other sites

Well, obviously you have messed something up :P

Windows programs are actually two programs in one .exe file. One of them is the actual Windows program you use, the other is a small DOS program displaying the  "This program can not be run in DOS mode" message. 

When you start them from command.com (the MS-DOS prompt, which is a DOS program too), the DOS part takes priority. Windows normally has a way to detect the Windows part of the program and start it instead (not sure how exactly), but you somehow disabled that. 

 

Do you need to start your programs specifically from the MS-DOS prompt? 

If not, use a Windows program to start them instead. Have you tried using Winfile? 

Or try some other replacement, like i.e. ExplorerASM or 7-Zip. A few more alternatives here - https://www.simplehelp.net/2006/10/11/10-windows-explorer-alternatives-compared-and-reviewed/

 

Maybe you could get a hint about how to fix this by examining the installer scripts of Win32s? See the end of this page for a download - https://www.classicdosgames.com/utilities/win9x.html

 

Link to comment
Share on other sites

Thank your both jaclaz and RainyShadow. I solved this when I was wandering on the wikipedia, and see this https://en.wikipedia.org/wiki/Windows_Console

"Windows 9x support is relatively poor compared to Windows NT, because the console window runs in the system virtual DOS machine and so keyboard input to a Win32 console application had to be directed to it by conagent.exe running in a DOS VM that are also used for real DOS applications by hooking the keyboard interrupt. conagent.exe then calls Vcond (which is a VxD). Vcond then had to pass the keyboard input to the System VM, and then finally to the Win32 console application. Besides performance, another problem with this implementation is that drives that are local to a DOS VM are not visible to a Win32 console application. This can cause confusion."

I found that my missing piece is called conagent.exe in the system folder.

To achieve this, there is no registry setting related. The required elements are PIFMGR.DLL, which allows you to edit the PIF. CRTDLL.DLL, START.EXE, and CONAGENT.EXE, which solve the last problem.

 

Link to comment
Share on other sites

Your project is very interesting, I was doing small Win9x myself a long time ago with good memories.

Can you show whole directory listing of your project? How it works without registry? This would mean only Explorer.exe cares about the registry and the rest of the system can work without it.

You'll be adding a lot of files so things are working correctly, after some point, the system won't be small anymore :P

 

Link to comment
Share on other sites

On 3/3/2022 at 4:03 AM, MrMateczko said:

Your project is very interesting, I was doing small Win9x myself a long time ago with good memories.

Can you show whole directory listing of your project? How it works without registry? This would mean only Explorer.exe cares about the registry and the rest of the system can work without it.

You'll be adding a lot of files so things are working correctly, after some point, the system won't be small anymore :P

 

It is just a toy these days, right?:P I am not intended to make some mini windows. I want to make some "good DOS". I just think that throwing some bones of windows to DOS is a better idea than using various DPMI hosts.

As windows is capable of multi-tasking, why not to let DOS act as some local environment, and let windows do all the magics. Just because it is too complicated and too large? But if you keep only the most basic functions. It is not that large. ove 90% of the size can be reduced.

Currently, this kind of configuration is good for me to run many retro games. That is enough.

I am not going to share the file list now, because I am playing with it, and it is dirty. I will share a clean and proved file list with scripts and configurations once I have cleaned it up.

I can tell you how I did it.

I followed the recipe here http://reboot.pro/index.php?showtopic=22584

and the pages on wikipedia: https://en.wikipedia.org/wiki/Architecture_of_Windows_9x

Copy those files, write a system.ini yourself, mostly the original WinME system.ini, and a skeleton win.ini.

Try to run regedit.exe, progman.exe, winfile.exe and notepad.exe. If they complain missing some files, copy them too.

If you still have errors, try to use dependency walker to profile that program in a normal installation of Windows ME. Find out what is missing and supply them to your installation.

Enventually, you will get a set of files to run these programs. Registry is not necessary for the above set (including the REGEDIT.EXE:buehehe:), although win.com will complain that when booting. The system behaves like Windows 3.x.

The command.com can be configured as a shell in the system.ini. In this way, you get multi-tasking DOS environment. The start command can be use to open DOS windows as many as your memory is enough. TSRs and environment vars can be loaded differently in every DOS session. This is interesting.

As for the registry again, if you only want these basics, it is not necessary. But if you desire TCP/IP stacks, NetBIOS, NTFS, COM/DCOM, WSH or something related to IE, it is a must. 

BTW, in this mode of running, there is no place for a real-mode DOS. CONFIG.SYS is not necessary if you do not need to load 16-bit drivers. Therefore, the Windows ME Real Mode DOS patching is not needed anymore. The hard drive version IO.SYS and COMMAND.COM works well in this mode.

 

 

Edited by PDU
Link to comment
Share on other sites

It makes sense now. After all, one of the key parts of Windows 9x is the Protected Mode MS-DOS 7.00/7.10/8.00 environment that's quite different than just patching Win3x to run on MS-DOS 7.00/7.10/8.00, you just removed all the other parts of 9x. :D

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...