Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a .bat file called whois.bat. It accepts one argument which is a userid. From the 'Run' dialog box, I want to be able to type 'whois 99999' instead of 'whois.bat 99999'. The file is located in the c:\WINXP\system32 folder but running it without the .bat extension is not working on my computer. However, it does work on some other computers. Is this a setting which can be altered somewhere?

share|improve this question
What happens when you run it without specifying .bat? Do you get an error message? – aphoria Aug 5 '11 at 11:39
You get a box asking you to select the program to open the 'whois' file with. – conorgriffin Aug 5 '11 at 12:26
hmmmmm..... after you posted the "error" that appears I think it is an error in register (something about .bat file extension)........ but try my solution below... perhaps you have another file in your computer with the same name but with an "unrecognized" extension and it would try to open it instead of your .bat. Are your .bat saving output or results to another file? – kokbira Aug 5 '11 at 12:40
up vote 3 down vote accepted

Well, since you informed that an window appears asking you which program would be used to open it, you have a file with unrecognized format with the same name and the answer is the first of two suspects below.

Another program of file with the same name

If you run "whois 99999" and get another error than an unrecognized command, probably you have in your computer another program of file with the same name that is called instead of your .bat.

Try just to rename your .bat file. If it functions after renaming, it is the reason to your issue. So go to Desktop, type F3 and search in files and folders (including hidden and system ones) for "whois". After you locate the other "whois" (probably "" or "whois.exe" if it is a program) you can decide to remove that file (if not necessary for you) or to rename your .bat.

Missing System32 folder in environment variable

See if your System32 folder is included in PATH environment variable.

Just open CMD and type:


If c:\WINXP\system32 do not appears in the result of above command, do WinKey+Break, then go to Advanced > Environment variables and put c:\WINXP\system32 at the end of PATH in User OR System variables. Do not forget to use ";" to separate paths in PATH variable.

share|improve this answer
Yup, it was another file with the same name in my path alright. Thanks – conorgriffin Aug 5 '11 at 13:05
Nice! I changed something in answer to match that comment I made below the question :) – kokbira Aug 5 '11 at 13:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.