Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This program cannot be run in DOS mode #3169

Closed
2 tasks done
Arthur3032 opened this issue Dec 22, 2021 · 19 comments
Closed
2 tasks done

This program cannot be run in DOS mode #3169

Arthur3032 opened this issue Dec 22, 2021 · 19 comments

Comments

@Arthur3032
Copy link

Code of Conduct & Contributing Guidelines

  • I agree to follow the code of conduct and the contributing guidelines.

Have you checked that no other similar question(s) already exists?

  • I have searched and didn't find any similar issues.

Question

dear sir,
I execute the command in the DOSBOX-X command mode,
For example: winet.exe
Will appear
This program cannot be run in DOS mode.
After all, it is still executed, and it is executed normally.
However, I am in Clipper 5.3b and call winet.exe
It only appears
This program cannot be run in DOS mode.
There is no more

ps.
DoxBox-X 0.83.21
DOS v7.1
country: 886,995
language: zh_TW

@joncampbell123
Copy link
Owner

EXE files will print that message when you execute the "MS-DOS stub" of a Windows application.

Real MS-DOS will do the same.

DOSBox-X will always run executables through the MS-DOS header, same as DOSBox SVN and any other fork, and any real MS-DOS system.

@joncampbell123
Copy link
Owner

This is the MS-DOS EXE header originally defined since MS-DOS 2.0:

http://www.delorie.com/djgpp/doc/exe/

@joncampbell123
Copy link
Owner

The Windows or OS/2 header is placed elsewhere in the EXE file, and a DWORD at offset 0x3C points at it. The signature at that offset indicates what kind it is.

"NE" Windows 3.x 16-bit executable or OS/2 16-bit executable
"PE" 32-bit/64-bit Windows executable, common in use still today
"LE" Linear executable, which is used by OS/2 32-bit, VXD drivers, and 32-bit MS-DOS programs loaded by DOS4GW or CWSDPMI

https://docs.microsoft.com/en-us/windows/win32/debug/pe-format?redirectedfrom=MSDN#ms-dos-stub-image-only

@joncampbell123
Copy link
Owner

This design allows the EXE to contain code for both MS-DOS and Windows. By default, Microsoft's Linker will attach a small "stub" program that prints that message, however you can put anything you like in the MS-DOS portion.

@Arthur3032
Copy link
Author

Understand, thanks for the detailed explanation

@Arthur3032
Copy link
Author

Can the DosBox-X window be resize, in runtime?

in English mode , it's ok, but Chinese mode, cannot be.
ps.
DoxBox-X 0.83.21
DOS v7.1
country: 886,995
language: zh_TW

@Wengier
Copy link
Collaborator

Wengier commented Dec 22, 2021

You can increase or decrease the window size in Chinese TTF mode at run-time with the menu options "Increase TTF font size" / "Decrease TTF font size" (under "Video" => "TTF options"), or using the keyboard shortcuts F11 + Up/Down (default for these menu options).

P.S. DOSBox-X emulates the behaviors of "pure" DOS mode by default, so the message "This program cannot be run in DOS mode" is expected when you run PE applications. There is a GUI for DOS known as Windows 9x which does allow you to run PE application outside DOS command prompt when launched from it, and you can run such applications if you enable START command with startcmd=true setting in DOSBox-X. Windows XP and later, however, are not DOS-based so they are no longer GUIs for DOS.

@Arthur3032
Copy link
Author

The response is really fast, thank you very much

@Arthur3032
Copy link
Author

But windows EXE, in DOSBOX-X command mode
can Directly give instructions (without CA-Clipper), how it to do.

@Arthur3032
Copy link
Author

image

@Wengier
Copy link
Collaborator

Wengier commented Dec 22, 2021

@Arthur3032 I don't have the Clipper program that you mentioned. Can you upload it so that I can test it as well?

@Arthur3032
Copy link
Author

Test.rar.zip

@Arthur3032
Copy link
Author

in Dosbox-X command mode
type
WINPRINT TT.PRG
( or another text file)

in Dosbox-X command mode
type
TT.exe (This is Clipper exe file, tt.prg is source code)

Wengier added a commit that referenced this issue Dec 22, 2021
@Wengier
Copy link
Collaborator

Wengier commented Dec 22, 2021

@Arthur3032 Thanks for the program. I could reproduce the issue, and have hopefully fixed in the updated Windows build below. Please check it out:

@Arthur3032
Copy link
Author

Too strong, can't believe it, am I dreaming? (It was actually executed normally)
Thank You very much.

@Arthur3032
Copy link
Author

So, in later versions, is that the same?

@Wengier
Copy link
Collaborator

Wengier commented Dec 22, 2021

@Arthur3032 Sure, it is fixed for the later version.

@Arthur3032
Copy link
Author

That's great

@Wengier
Copy link
Collaborator

Wengier commented Dec 24, 2021

Closing the issue.

@Wengier Wengier closed this as completed Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants