CMD Commands not working unless run as admin.

mazooni

Honorable
Jul 7, 2013
574
1
11,165
Hi my Command Prompt commands do not work unless I run command prompt as admin. This is what it shows when I run the "net user" command and the "ipconfig" command. No commands work unless run as admin. They use to work not sure what made them stop working I haven't installed any software recently or done anything that could have effected it. Is there any way to just rest cmd to default?

Thanks :).

http://gyazo.com/2d79185bad45334d07a4578f6e737e8c
http://gyazo.com/dde4d388bd3db742c1585ec38f8cc9fe
 
Solution


that's all I can help. at least all commands work in elevated rights.
you can force CMD to run with admin rights always

1.Open the Registry Editor. (Run -> regedit)

2.Navigate to the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

3.Right-click the pane on the right -> New -> String Value.
Enter n:\Windows\System32\cmd.exe as the NAME of the String Value.
(where n:\ is your Windows drive letter)...

Gaming God

Reputable
Feb 21, 2014
264
0
4,960
In Folder Options/View uncheck “Hide protected operating system files”

Open C:\autoexec.bat with Notepad
Add this new line
PATH=C:\winnt;c:\winnt\system32;c:\windows;c:\windows\command
Save the file and reboot
It should work then
 

Gaming God

Reputable
Feb 21, 2014
264
0
4,960
{}{}{} ALTERNATIVE GIVE AT THE END

try these one by one
1. Try to run sfc /scannow to check system files: http://support.microsoft.com/kb/929833

2.THE BEST ONE. THIS SHOULD SOLE YOUR PROBLEM
*right click the My Computer icon then choose properties. Select the Advanced tab and then click Environment Variables.
{}{}{}{}*At the system variables panel, choose Path then click the Edit button.
*****NOTE: I would recommend copying this value and pasting it on Notepad first before editing. Save the old value as a text file so you will have a backup of the original value.
*Edit the variable value. It is a long string separated by semicolons. Make sure the executable file’s location is one of the entries on this string. If it is not, enter the location of the executable file.

[C:\Windows\System32\; ] AFTER THE SEMI COLON the executable file’s location

Click OK after editing the value. Reboot the computer to enable the new value. After rebooting, try executing the command again and verify that it fixed your problem. If it doesn’t, double check the value of the path variable again. It could be a bad syntax with the semicolons or a wrong value is entered.

{}{}{} Instead of editing the system variable create a new user variable(top section) named "Path" and the value "C:\Windows\System32\;" without the quotes of course
 

Gaming God

Reputable
Feb 21, 2014
264
0
4,960


that's all I can help. at least all commands work in elevated rights.
you can force CMD to run with admin rights always

1.Open the Registry Editor. (Run -> regedit)

2.Navigate to the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

3.Right-click the pane on the right -> New -> String Value.
Enter n:\Windows\System32\cmd.exe as the NAME of the String Value.
(where n:\ is your Windows drive letter)

4.Double-click your newly made String Value and rename to RUNASADMIN as Data Value.
 
Solution

mazooni

Honorable
Jul 7, 2013
574
1
11,165
Thanks for all the help. At least now it will be easier to run it as admin whenever I need. One more thing, whenever I set the path in environmental variables I click ok or apply whichever I am prompted and whenever I restart my pc it automatically changes back to C:\Program Files. maybe if there was a way to keep it from automatically changing back that might work?