I am getting “This program cannot be run in DOS mode” in Windows XP

37,255

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

Share:
37,255

Related videos on Youtube

user41648
Author by

user41648

Updated on September 18, 2022

Comments

  • user41648
    user41648 over 1 year

    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?

    • Synetech
      Synetech over 11 years
      What program are you trying to run that causes that?
    • user41648
      user41648 over 11 years
      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?
    • Synetech
      Synetech over 11 years
      Hmm, that’s strange because it sounds like a permission issue, but that wouldn’t be the error for permissions.
    • Admin
      Admin over 11 years
      Could this be DEP?
    • Synetech
      Synetech over 11 years
      @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.
    • Admin
      Admin over 11 years
      Mmm, that implies command vs cmd then. Alternatively, 64-bit XP (though that's unlikely).
    • Mike Christiansen
      Mike Christiansen over 11 years
      Remember, 64-bit OS cannot run 16-bit programs. I don't think its an issue here, but be aware.
  • Synetech
    Synetech over 11 years
    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).
  • Karan
    Karan over 11 years
    @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.
  • Giacomo1968
    Giacomo1968 about 5 years
    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.
  • G-Man Says 'Reinstate Monica'
    G-Man Says 'Reinstate Monica' about 5 years
    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.
  • Yablargo
    Yablargo over 4 years
    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