基本的Windows命令(ping,ipconfig)需要管理员权限 - 寻找一个选项 [英] Basic windows commands (ping, ipconfig) need admin rights - looking for an option
问题描述
在我的主电脑(Win 7 64位)基本的Windows命令,如ping和ipconfig突然需要管理权限。
如果我开始一个正常的命令行窗口,命令不再被发现(X不被识别为内部或外部命令,可操作的程序或批处理文件。)
如果我开始命令行窗口以管理员身份运行一切正常。
在我的第二台电脑上(Win 7 32位),我不需要管理员权限。
我坚信,我几个星期前不需要在我的主电脑的管理员权限。一些必须改变,因此我认为必须有一些(注册表)开关或某事。
任何想法?非常感谢。
我仍然是管理员用户 -
p>这的确是PATH,变量。问题是,该路径在注册表中保存为错误的字符串类型
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control \Session Manager \Environment\Path
必须是一个REG_EXPAND_SZ,如此主题。路径是错误类型的字符串,使它无法展开%SystemRoot%。请确保您的系统PATH以及您的用户PATH环境变量的类型为REG_EXPAND_SZ。
查看以下命令的输出
设置路径
dir%windir%\system32\ping.exe
dir%windir%\syswow64\ping.exe
dir%windir%\sysnative\ping.exe
以为,他们会给你一个问题。可能是由%path%或某种方式找不到...
On my main pc (Win 7 64bit) basic windows commands like ping and ipconfig suddenly need admin rights.
If I start a normal command-line window, these commands are not found anymore ("X is not recognized as an internal or external command, operable program or batch file.")
If I start the command-line window with "Run as Administrator" everything works as expected.
On my second PC (Win 7 32 bit) I do not need admin rights. And I strongly believe that I did not need admin rights on my main pc a couple of weeks ago. Something must have changed, thus I think there must be some (registry) switch or something.
any ideas? thanks a lot
[edit]
I am still the admin user - just starting cmd normally, not with "run as admin"
[edit2]
It indeed was the PATH, variable. Problem was, that Path was saved as the wrong type of string in the registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path
has to be a REG_EXPAND_SZ as explained in this thread. Path being of the wrong type of string made it unable to expand %SystemRoot%. Make sure that both your system PATH as well as your user PATH environment variables are of type REG_EXPAND_SZ.
Srart normal cmd prompt and look at output of the following commands
set path
dir %windir%\system32\ping.exe
dir %windir%\syswow64\ping.exe
dir %windir%\sysnative\ping.exe
Thought, they will show you a problem. May be ping is not found by %path% or somehow...
这篇关于基本的Windows命令(ping,ipconfig)需要管理员权限 - 寻找一个选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!