1

In some Windows OS, every command line program works fine, but in some Windows releases—such as Windows XP— I get this error:

“This program cannot be run in DOS mode.”

How do I avoid this problem?

This problem occurs when I attempt to use nmap, pwdump and zenmap but calc.exe work and other built-in exe's work. What is happening?

7
  • What program are you trying to run that causes that?
    – Synetech
    Sep 18, 2012 at 23:21
  • nmap, pwdump and etc. (zenmap is not working also, in graphical side) but calc.exe works and other built-in exe's, so I am going like, what the hell is this?
    – user41648
    Sep 18, 2012 at 23:28
  • Hmm, that’s strange because it sounds like a permission issue, but that wouldn’t be the error for permissions.
    – Synetech
    Sep 18, 2012 at 23:38
  • Could this be DEP?
    – user3463
    Sep 18, 2012 at 23:45
  • @RandolphWest, I can’t imagine that DEP would throw that error. The only reasons I can think of for that specific error would be either running it in DOS, or if the executable is corrupt.
    – Synetech
    Sep 18, 2012 at 23:49

2 Answers 2

1

Are you using Command.com or Cmd.exe? Try Cmd.

Also if you're using a shortcut to get to the command prompt, make sure you've not messed with the program's settings, especially those related to Memory or Compatibility (note: screenshots sourced from random site, do not configure as shown since those are probably not all default settings):

EXE Memory settings on XP EXE Compatibility settings on XP

2
  • That’s what I thought of first, but it shouldn’t matter; it would still run Windows executables (remember, there do exist 16-bit Windows programs).
    – Synetech
    Sep 18, 2012 at 23:39
  • 2
    @Synetech: No harm in checking. Maybe some setting such as Protected etc. is causing 32-bit EXEs to fail, thinking that the environment is actual DOS.
    – Karan
    Sep 18, 2012 at 23:42
1

I have just encountered the same problem and found a solution that will probably work for you too.

I assume that you have used ftp via command line to get the files onto the machine that you are trying to run the exe on.

To fix the problem download the files again but remember to turn on binary mode. I did that and now the exes run no problem.

4
  • The original poster states this issue is with programs like nmap, pwdump and zenmap, so this has nothing to do with FTP downloads and downloading items in non-binary (aka: text) mode. Apr 26, 2019 at 23:51
  • How do you figure that? nmap, pwdump and zenmap are not standard Windows programs, so, if they’re on the OP’s system, they must have been installed / downloaded from somewhere. Apr 26, 2019 at 23:58
  • The user is doing pen testing and likely is trying to further look at the system now that they have a shell connection. These tools are unexpectedly not working on the target system. ...I'm dealing with exactly the same issue right now
    – Yablargo
    Dec 17, 2019 at 4:06
  • This helped fix my issue - thank you! Jul 14, 2022 at 0:36

Not the answer you're looking for? Browse other questions tagged .