Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: CMD doesn't recognize commands from run dialoge box - error

02 Feb 2012   #1
Lol Froob

Windows 7 Ultimate x64
 
 
CMD doesn't recognize commands from run dialoge box - error

Whenever I open up the cmd using start>run>cmd, it never allows me to run a command (it will say for e.g. that 'taskmgr' is not recognized as an external or internal command).

However, when I navigate to "C:\Windows\System32\cmd.exe" it will allow me to run any command including taskmgr. So in short, my cmd doesn't work right if I use the shortcut start>run>cmd.

I believe it may have to due with opening up in 'C:\Users\Chris' but I am not sure.

Here are two images for your reference:

Attachment 196416

Attachment 196417


My System SpecsSystem Spec
.
03 Feb 2012   #2
richc46

Microsoft Community Contributor Award Recipient

Windows 10, Home Clean Install
 
 

Welcome
Be happy that your computer is working as it should
The system CMD is called an elevated prompt and has full authority
The Chris prompt is limited
Many commands from Chris are not suppose to work as a protective measure, only the elevated prompt will work in those situations.
An administrators password is needed for the elevated prompt
Elevated Command Prompt
My System SpecsSystem Spec
03 Feb 2012   #3
Lol Froob

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by richc46 View Post
Welcome
Be happy that your computer is working as it should
The system CMD is called an elevated prompt and has full authority
The Chris prompt is limited
Many commands from Chris are not suppose to work as a protective measure, only the elevated prompt will work in those situations.
An administrators password is needed for the elevated prompt
Elevated Command Prompt
How come when I used 'start>run>cmd' before my commands used to work. Now they don't. I know this for sure. It's not that I don't have rights because, then, wouldn't the error code say, "System 5 Error Access Denied". In this case, the cmd is not reading the commands properly. I am guessing that by putting in just 'cmd', it starts off in the wrong directory, hence is not able to read commands by their executable names. (e.g. taskmgr, calc, notepad, etc.)

I just would like to know a fix for this since having to go to my desktop is now the fastest way to open the cmd.

I want to be able to run commands in my cmd by using "start>run>type in 'cmd' and hit enter" for anyone who is clueless reading this post.
My System SpecsSystem Spec
.

03 Feb 2012   #4
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi,

Rich is 100% correct - the reason is the differnt states of elevation of the CMD prompt.

Your best bet is to pin the CMD command to your taskbar, and then hold SHIFT+CONTROL+ALT and click the pinned CMD icon : this will open the CMD window in the elevated state.

Regards,
Golden
My System SpecsSystem Spec
03 Feb 2012   #5
richc46

Microsoft Community Contributor Award Recipient

Windows 10, Home Clean Install
 
 

If you are giving correct information, the computer was not working the way that it should have, before. It would not show an error, it just would not take the command. It has happened to me. I recognize the cause, go to an elevated prompt and it works.
This may help make your like easier:
Elevated Command Prompt Shortcut
My System SpecsSystem Spec
03 Feb 2012   #6
writhziden

Windows 7 Home Premium 64 Bit
 
 

Do any commands work in the command prompt?

I helped someone else with a similar problem earlier this week who could not even type exit to exit the command prompt. ipconfig and ping commands should also be recognized in either elevated or normal mode.
My System SpecsSystem Spec
03 Feb 2012   #7
Lol Froob

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by Golden View Post
Hi,

Rich is 100% correct - the reason is the differnt states of elevation of the CMD prompt.

Your best bet is to pin the CMD command to your taskbar, and then hold SHIFT+CONTROL+ALT and click the pinned CMD icon : this will open the CMD window in the elevated state.

Regards,
Golden
It is running as an elevated command prompt. See the Administrator: at the top of the windows. Thanks for the info, It'll come of use later but right now I am not looking for a 'hotfix'.

Quote   Quote: Originally Posted by richc46 View Post
If you are giving correct information, the computer was not working the way that it should have, before. It would not show an error, it just would not take the command. It has happened to me. I recognize the cause, go to an elevated prompt and it works.
This may help make your like easier:
Elevated Command Prompt Shortcut
Everything worked before, and notice, it is running as an elevated command prompt. See the 'Administrator:' at the top of cmd window in picture.

Quote   Quote: Originally Posted by writhziden View Post
Do any commands work in the command prompt?

I helped someone else with a similar problem earlier this week who could not even type exit to exit the command prompt. ipconfig and ping commands should also be recognized in either elevated or normal mode.
Well, the only commmands that work are commands like exit, cd, start. however, when I navigate to the system32 by using cd\windows\system32 in the problem ridden cmd, all the commands work.

Another user from hackforums has suggested that the problem has to do with my environmental variables. Here is his post, all credit goes to Polymath 1.0 on hackforums.net. I am simply using this as a reference to see if your approve/disprove his answer.

Quote   Quote: Originally Posted by Polymath 1.0' pid='19631089' dateline='1328281905
It is because the environment path variables that the command line cmd interpreter parses to resolve the location of an external process hasn't been set. Rather than navigating to the folder you could get around it by specifying the path to the process explicitly to the CLI command interpreter. In your example you could use %windir%\System32\Taskmgr as %windir% is just such an environment variable that resolves to C:\Windows and the subfolder System32 is where taskmgr.exe resides. Another system variable %COMSPEC% + enter if typed into the Search or Run dialogue box will open a cmd prompt in Windows\System32. So when the command window was open you could then simply type the name of any process in System32 and it would work without errors as there is no unresolved path.

A nice feature of Vista and Windows 7 is that in any Windows Explorer folder view if you press Shift + Right Click you open a secondary context menu with an open Command prompt here which saves you navigating via the command line. Additionally if you press Shift + Crtl + Right Click on that Command prompt here item it opens as an elevated Administrative command process.

Take care

My System SpecsSystem Spec
03 Feb 2012   #8
writhziden

Windows 7 Home Premium 64 Bit
 
 

It is likely due to your environment variables. Here is what I suggest:
  1. Click Start Menu
  2. Type sysdm.cpl into the Search programs and files (do not hit enter)
  3. Right click sysdm.cpl and select Run as administrator
  4. Go to Advanced
  5. Click Environment Variables...
  6. Double click Path from the System Variables list (after scrolling down)
  7. Select everything in the box Variable Value:
  8. Hit CTRL + X to cut the values, leaving it blank (you may have to put a space in), and hit OK.
  9. Hit OK again to close Environment Variables to reset the Path to nothing.
  10. Now, click Environment Variables... again.
  11. Double click Path in System Variables (after scrolling down again)
  12. Paste the values back into the path Variable Value by hitting CTRL + V.

Does command prompt work after the above process?

If not, do steps 1-8, but use CTRL + C instead of CTRL + X (do not leave the path blank this time in other words), and paste the path in your next post. You may be missing important variables.
My System SpecsSystem Spec
03 Feb 2012   #9
Lol Froob

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by writhziden View Post
It is likely due to your environment variables. Here is what I suggest:
  1. Click Start Menu
  2. Type sysdm.cpl into the Search programs and files (do not hit enter)
  3. Right click sysdm.cpl and select Run as administrator
  4. Go to Advanced
  5. Click Environment Variables...
  6. Double click Path from the System Variables list (after scrolling down)
  7. Select everything in the box Variable Value:
  8. Hit CTRL + X to cut the values, leaving it blank (you may have to put a space in), and hit OK.
  9. Hit OK again to close Environment Variables to reset the Path to nothing.
  10. Now, click Environment Variables... again.
  11. Double click Path in System Variables (after scrolling down again)
  12. Paste the values back into the path Variable Value by hitting CTRL + V.

Does command prompt work after the above process?

If not, do steps 1-8, but use CTRL + C instead of CTRL + X (do not leave the path blank this time in other words), and paste the path in your next post. You may be missing important variables.
Didn't work, and all I have in Path is
Code:
;C:\Program Files\Java\jdk1.7.0\bin
My System SpecsSystem Spec
03 Feb 2012   #10
writhziden

Windows 7 Home Premium 64 Bit
 
 

Quote   Quote: Originally Posted by Lol Froob View Post
Quote   Quote: Originally Posted by writhziden View Post
It is likely due to your environment variables. Here is what I suggest:
  1. Click Start Menu
  2. Type sysdm.cpl into the Search programs and files (do not hit enter)
  3. Right click sysdm.cpl and select Run as administrator
  4. Go to Advanced
  5. Click Environment Variables...
  6. Double click Path from the System Variables list (after scrolling down)
  7. Select everything in the box Variable Value:
  8. Hit CTRL + X to cut the values, leaving it blank (you may have to put a space in), and hit OK.
  9. Hit OK again to close Environment Variables to reset the Path to nothing.
  10. Now, click Environment Variables... again.
  11. Double click Path in System Variables (after scrolling down again)
  12. Paste the values back into the path Variable Value by hitting CTRL + V.

Does command prompt work after the above process?

If not, do steps 1-8, but use CTRL + C instead of CTRL + X (do not leave the path blank this time in other words), and paste the path in your next post. You may be missing important variables.
Didn't work, and all I have in Path is
Code:
;C:\Program Files\Java\jdk1.7.0\bin
Replace your path with:
Code:
%SYSTEMROOT%\System32;%SYSTEMROOT%;%SYSTEMROOT%\System32\wbem;C:\Program Files\Java\jdk1.7.0\bin
Does the command prompt now accept the normal commands?
My System SpecsSystem Spec
Reply

 CMD doesn't recognize commands from run dialoge box - error




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How do I reformat a HDD that W7 doesn't recognize?
I have an external 750GB HDD that I bought to to store programming from my Dish Network Receiver. The receiver software reformatted the virgin HDD to some proprietary system used by Dish. I think someone said it's a Linux based siystem. I now want to reformat it for use with my Windows 7...
Hardware & Devices
Command prompt doesnt recognize commands / cant repair windows
i cant run any commands in command prompt.i have checked a lot of stuff on inet to solve like paths @environment variables etc but i still couldnt solve it.i thought maybe its cuz a system file is missing made a repair disc but couldnt run sfc via command prompt at boot because i got this error...
BSOD Help and Support
win 7 doesn't recognize NEC usb 3.0 driver
Hi! New to this forum and hope someone can help. Just installed WD My Book 3.0 (usb 2/3). Followed user guide, installed NEC usb 3.0 driver v.1.0.18 first from cd, then NEC usb 3.0 pci-e card in empty pci-e slot on Rampage Formula mobo - yes, I know this is not a usb 3.0 mobo, but according to...
Drivers
Repair doesn't Recognize my Win 7 OS
I recently came home and my computer was on the black start-up screen. It gave the error status: 0xc000000F, File:\boot\BCD. I tried to run the repair disk, but it doesn't recognize the Win 7 OS. It does see the old Vista OS. I believe this occurred after a recent Windows update (set to automatic)....
BSOD Help and Support
Seven doesn't recognize my microphone
I run a Compaq Presario with a built-in Conexant microphone. It worked fine in Windows Vista but when I tried to set up voice to text after I wiped to Seven, it didn't even recognize that I have a microphone. My laptop got smashed really badly a few months ago, (:eek:) and idk how to tell if this...
Sound & Audio
Windows 7 Doesn't recognize USB HD
This problem used to happen in Vista and just started popping up in my Windows 7 32 bit 7100.0.090421-1700. The drive is a 100gb Maxtor external usb drive. I've tried unplugging it and replugging it. Also I just rebooted with no luck. I'm going to boot to my 64 bit version to see if this problem...
Hardware & Devices


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 21:12.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App