1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

"This program cannot be run in DOS mode"...

Discussion in 'Windows XP' started by trist007, Sep 23, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. trist007

    trist007 Thread Starter

    Joined:
    Sep 23, 2008
    Messages:
    10
    Hello All, this is my first post. Anyhow, I am running Windows XP Professional with SP3 and I'm the Administrator. Anyhow, I'm trying to execute a basic .exe MZ file from the cmd. I get "This program cannot be run in DOS mode". I don't understand why an .exe, the most basic one MZ cannot be run in dos mode. Is this a restriction set by the Administrator? (Maybe in control panel-administrative tools-local security policy?) I've done some reading and have heard that I may need to tweak some options by right clicking on the title bar of the cmd shell and changing something that has to deal with not letting windows interefere or that windows compatibility is turned on. However, I think that option is only for Windows 98 and is not available in winxp pro. I've tried right clicking on the file in windows explorer, going to properties and making a .pif file for it by trying all the different compatibilities just to try everything out. Still the same error gets returned. Is it because cmd is not a true DOS OS?

    Also, what's the difference between a cmd shell and a command shell?

    Under the cmd shell, I'm missing a bunch of the old dos commands like where, su, kill and a bunch of other ones. Where can I download the binaries? Would I just copy them to the c:\windows\system32 dir? No need to compile or anything?

    Also, the boot file that can be edited through control panel-system-advanced-startup and recovery-edit? What's the exact path leading to the file? Or is the only way to edit the file through that gui?

    Lastly, what's the command in cmd to show all the processes with their numbers so that I can kill processes.
     
  2. trist007

    trist007 Thread Starter

    Joined:
    Sep 23, 2008
    Messages:
    10
    My goal is to be proficient in a cmd shell. Makes me feel smarter hehe.

    I'd also like to know how to enable messenger and telnet. For example,

    let's say you input

    net start messenger or net start telnet

    sometimes it's disabled through control panel-admin tools-services.

    Is there a way to enable it from the cmd shell?

    Also how do you delete a registry key from the cmd shell

    I've tried

    reg del (whole key) Do I need to put in the whole key including the /v /t /d? Cause I've tried both ways and they both fail.
     
  3. trist007

    trist007 Thread Starter

    Joined:
    Sep 23, 2008
    Messages:
    10
  4. trist007

    trist007 Thread Starter

    Joined:
    Sep 23, 2008
    Messages:
    10
    What does exclamation sign mean?
     
  5. ZeRealBigBoss

    ZeRealBigBoss

    Joined:
    Mar 17, 2007
    Messages:
    193
    From XP onwards you do not have a real command shell but only a simulated one. Windows controls what you are allowed to do in there, so many things. like e.g. direct port access, are not permitted. If you want a real command shell, you will have to run W98 and set the Windows environment off.

    Furthermore, there is a difference between a command shell EXE and a Windows EXE. The latter needs Windows services and DLL files, while the former does have all the necessary sub-procedures built in; that is why you can not run a Windows EXE in a command shell.
     
  6. trist007

    trist007 Thread Starter

    Joined:
    Sep 23, 2008
    Messages:
    10
    How do I run that Win exe then? I tried double clicking it from the windows explorer and it still outputs cannot be run in dos mode. I have the .dll file to go with it in the same directory.
     
  7. trist007

    trist007 Thread Starter

    Joined:
    Sep 23, 2008
    Messages:
    10
    Anybody any ideas? Let me explain further what I'm trying to do. Just started using linux 7 months ago and loved it. Then I got into the pentesting scene and I love it. I'm addicted. I think I finally found what I want to do for the rest of my life. So, I setup my own computer lab at my house. I got two main computers, an e8400 and a q67600 and a celeron( I used to hate these chips for their lack of computing power, but they great as a server) server on the side that I put on my mini fridge to keep it cool. So here's the setup, I had a windows computer listen with nc.exe on a port and conifgure it to run a cmd shell and open up on my admin account. I connect with my linux box. Once I'm in, I tftp some files in, namely pwdump4.exe and pwdump4.dll. I put those in c:\windows\system32. I run them. However, when I try running pwdump4.exe I get the "This program cannot be run in DOS mode". However, I think I got it to work before somehow. Also, I know this isn't a privelege problem because I've gotten System priveleges, by using the AT xxx /interactive "cmd.exe" and then closing explorer, waiting for the new cmd to open and then reexecute explorer to get system priveleges, and even still I get that same error "This program cannot be run in DOS mode" when I try running pwdump4.exe. Why do I get this error? The pwdump4.dll is in the same directory as pwdump4.exe. I just want to understand how it all works.
     
  8. ZeRealBigBoss

    ZeRealBigBoss

    Joined:
    Mar 17, 2007
    Messages:
    193
    As I don't know the pwdump and its implications, I checked it on the net. That gave a very interesting explanation:

    quote
    A5: pwdump4.exe doesn't use the PwDump4.dll directly, it inject a thread into lsass.exe to load PwDump4.dll and run a function to do hash dump. The PwDump4.dll must in the same folder with pwdump4.exe, for pwdump4.exe just let the remote thread to load PwDump4.dll at same path of pwdump4.exe. When the pwdump4.exe at the share of remote computer, the lsass process are also to load the dll in the same share, in your condition it's \\192.168.0.1\share\PwDump4.dll, but the lsass.exe(in LOCAL_SYSTEM account) cannot access the share \\192.168.0.1\share\, although u can, so -1(load PwDump4.dll failed). And u copy PwDump4.dll to your system32 have no use, no one will look for it. To do, just copy them two in local.
    unquote

    I must admit that I am heavilty overtaxed with this. The only thing I can advice is to try and run a standard program in that command shell. If that runs OK, the problem is not in the command shell but in pwdump itself, and that you better post in the thread "All other software".
     
  9. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - program cannot mode
  1. Technoid1
    Replies:
    12
    Views:
    695
  2. ImWolf
    Replies:
    1
    Views:
    661
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/752481

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice