Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: command prompt problem

  1. #11
    bigboab's Avatar Poster BT Rep: +1
    Join Date
    Jul 2003
    Posts
    29,621
    Quote Originally Posted by lynx View Post
    Quote Originally Posted by bigboab View Post
    This is my second attempt. I hope it is of help. You can't have two or more Executable files with the same 'first part' name, for obvious reasons, the computer would not know which one to run. Remembering you only need to enter the first part of an executable file for it to run. So if you have entered CMD.XXX (used to be command.com) which is the DOS shell then it is up and running. If you try to run it again while it is running you will get an error message.

    If this does not help please ignore me. Almost everyone else does.
    Sorry Bob, that's simply not true.

    If you don't specify where the program is, the "PATH" variable determines which folders the system searches and the order in which they are searched.

    If you don't specify the extension the "PATHEXT" variable determines which ones are possible matches, but does not affect the order in which they are checked.

    For example, if you create a file called cmd.abc in the C:\Windows\System32 folder, then just type "cmd" the system will find cmd.abc before cmd.exe because it is earlier alphabetically. It will then check "PATHEXT" and will normally reject the file because .abc is not in "PATHEXT", and look for the next file. However, if you add .abc anywhere in "PATHEXT" the system will select that file as a match, because the order in "PATHEXT" is not important.

    Once the system has found a matching file, whether by clicking on the file, typing it's full path or by allowing the system to find it for you, it will try to execute the file by comparing the extension with the contents of the registry. If there is no equivalent class in the registry then you get the error message shown in this problem.
    I was quoting MS-DOS from 1980's 90's. I don't know or have never heard of pathext. I was thinking of the old Command prompt.
    Too late to learn now. I was under the wrong impression that the command prompt took you to the old operating system C:\> Prompt.
    I was wrong in terms of century.
    Last edited by bigboab; 06-05-2008 at 07:15 AM.
    The best way to keep a secret:- Tell everyone not to tell anyone.

  2. Software & Hardware   -   #12
    guys i dint knw wat to do now can u tell me how to slove the problem..plz guys help me..wat to do...

  3. Software & Hardware   -   #13
    lynx's Avatar .
    Join Date
    Sep 2002
    Location
    Yorkshire, England
    Posts
    9,759
    Quote Originally Posted by lynx View Post
    you need to know the path extensions that your system will treat as executable programs. Right click on "My Computer" and select "Properties".
    Choose the "Advanced" tab and press the button marked "Environment Variables".

    First of all, look in the top box ("User variables for xxxxx") to see if there is a variable called "PATHEXT" - it should not be there but if it is make a note of it's contents then select and delete it.

    Assuming you didn't find it in the top box, find the variable called "PATHEXT" in the bottom box ("System variables") and make a note of it's contents. The default should be ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH", if it is any different from that I'd advise setting it to that, at least for the time being.

    Come back and tell us what you found. If you had to delete or change the "PATHEXT" variable in either of the boxes you've probably already cured the problem.

    If you didn't have to change anything, then the system has forgotten how to deal with one of the extensions, and I'll check out what you need to do to fix it.
    It depends on what you find when you've done this.

    Also, you could search for files/folders called "cmd.*", one of them will be the offending item.
    Last edited by lynx; 06-05-2008 at 03:54 PM.
    .
    Political correctness is based on the principle that it's possible to pick up a turd by the clean end.

  4. Software & Hardware   -   #14
    i check the things what u told me to check..but its all correct..than what should i do..still i have same problem..n vry thanks for ur help M.R lynx

  5. Software & Hardware   -   #15
    lynx's Avatar .
    Join Date
    Sep 2002
    Location
    Yorkshire, England
    Posts
    9,759
    I assume you mean that there was no Environment variable called PATHEXT in the user environment and that the PATHEXT in the system environment was the same as default.

    Did you find any other files called cmd.<???>, where .<???> is one of the items in the PATHEXT variable, in other words one of:
    cmd.COM
    cmd.BAT
    cmd.CMD
    cmd.VBS
    cmd.VBE
    cmd.JS
    cmd.JSE
    cmd.WSF
    cmd.WSH

    I should probably point out that you need to be able to see file extensions to answer that question, and you also need to be able to see protected operating system files. In case you don't know how to see those, open up "My Computer" and select "Tools/Folder Options". Choose the "View" tab and uncheck the boxes labelled "Hide extensions for known file types" and "Hide protected operating system files". Also select option "Show hidden files and folders" just in case the file causing the problem is hidden. Click OK.

    If you had to make any changes in that bit, repeat your search for files called "cmd.*", and let us know what you find. If you only find "cmd.exe" then I don't know what to suggest next.
    .
    Political correctness is based on the principle that it's possible to pick up a turd by the clean end.

  6. Software & Hardware   -   #16
    Thanx MR Lynx.... now its working

  7. Software & Hardware   -   #17
    Chewie's Avatar Chew E. Bakke
    Join Date
    Feb 2004
    Posts
    4,008
    Every time my kids tell me I'm a 'Windows Wizard', all I need do to bring me back to Earth is read one of your posts, Chris.
    There isn't a bargepole long enough for me to work on [a Sony Viao] - clocker 2008

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •