关于修改hosts文件权限 w}YO+
c9r, <TR9
修改hosts文件需要管理员权限,下列代码复制到记事本另存为reg文件后执行,可在文件右键添加“管理员取得所有权”选项,非常有用。 )t&j0`Yq
PzNk: O
Windows Registry Editor Version 5.00 XwE(&ZCf'b
3|l+&LF!IC
[HKEY_CLASSES_ROOT*shellrunas] ]Dd=q6
@="管理员取得所有权" &mp=j GR
"NoWorkingDirectory"="" rp+&ax}Wh
" :@5|4qK
[HKEY_CLASSES_ROOT*shellrunascommand] [f&ja[m q
@="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" #4DEb<D
"IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" xW!2[.O5H
Ihw^g<X
[HKEY_CLASSES_ROOTexefileshellrunas2] m fg{% .1
@="管理员取得所有权" %N=-i]+Id
"NoWorkingDirectory"="" i4JqU\((]
OZB(4{vnyC
[HKEY_CLASSES_ROOTexefileshellrunas2command] 6"/cz~h
@="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" ^fQ ]>/u
"IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" :l'61$=
Xg_M{t
[HKEY_CLASSES_ROOTDirectoryshellrunas] ofC=S$wX
@="管理员取得所有权" 9l+'V0?`
"NoWorkingDirectory"="" ~$Xz~#~
wG ua"@IE
[HKEY_CLASSES_ROOTDirectoryshellrunascommand] DwMq
@="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t" eR$qw#%c*
"IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t" h2QoBGL5
Mxc0=I'a