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

-1

0

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?

user41648

Posted 2012-09-18T23:14:48.280

Reputation: 43

Question was closed 2019-05-07T13:29:34.940

What program are you trying to run that causes that? – Synetech – 2012-09-18T23:21:57.310

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 – 2012-09-18T23:28:15.103

Hmm, that’s strange because it sounds like a permission issue, but that wouldn’t be the error for permissions. – Synetech – 2012-09-18T23:38:11.770

Could this be DEP? – None – 2012-09-18T23:45:16.243

@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 – 2012-09-18T23:49:43.950

Mmm, that implies command vs cmd then. Alternatively, 64-bit XP (though that's unlikely). – None – 2012-09-19T00:00:09.517

Remember, 64-bit OS cannot run 16-bit programs. I don't think its an issue here, but be aware. – Mike Christiansen – 2012-10-02T06:33:56.660

Answers

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

Karan

Posted 2012-09-18T23:14:48.280

Reputation: 51 857

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 – 2012-09-18T23:39:19.193

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 – 2012-09-18T23:42:02.840

0

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.

Jason

Posted 2012-09-18T23:14:48.280

Reputation: 19

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. – JakeGould – 2019-04-26T23:51:06.287

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. – G-Man Says 'Reinstate Monica' – 2019-04-26T23:58:30.290

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 – 2019-12-17T04:06:10.187