幽灵资源网 Design By www.bzswh.com
复制代码 代码如下:
@ECHO OFF
title C盘权限批量处理-2010.7.1
echo -----------------------------
echo 服务器C盘权限设置
echo https://www.jb51.net
echo -----------------------------
:menu
echo.
echo [1] 删除C盘的everyone的权限
echo [2] 删除C盘的所有的users的访问权限
echo [3] 添加iis_wpg的访问权限
echo [4] 添加iis_wpg的访问权限[.net专用]
echo [5] 添加iis_wpg的访问权限[装了MACFEE的软件专用]
echo [6] 添加users的访问权限
echo [7] 删除C盘Windows下的所有的危险文件夹
echo [8] 删除系统危险文件的访问权限,只留管理组成员
echo [9] 注册表相关设定
echo [10] 将C盘权限还原为默认[需重启]
echo [0] 退出
echo.
@echo 请选择?
@echo 输入上面的选项回车
@echo off
set /p menu=
if %menu% == 0 goto exit
if %menu% == 1 goto 1
if %menu% == 2 goto 2
if %menu% == 3 goto 3
if %menu% == 4 goto 4
if %menu% == 5 goto 5
if %menu% == 6 goto 6
if %menu% == 7 goto 7
if %menu% == 8 goto 8
if %menu% == 9 goto 9
if %menu% == 10 goto 10
:1
echo 删除C盘的everyone的权限
cacls "%SystemDrive%" /r "CREATOR OWNER" /e
cacls "%SystemDrive%" /r "everyone" /e
cacls "%SystemRoot%" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings/All Users" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings/All Users/Documents" /r "everyone" /e
echo.
echo 删除C盘的everyone的权限 ………………ok!
echo.
goto menu
:2
echo 删除C盘的所有的users的访问权限
cacls "%SystemDrive%" /r "users" /e
cacls "%SystemDrive%/Program Files" /r "users" /e
cacls "%SystemDrive%/Documents and Settings" /r "users" /e
cacls "%SystemRoot%" /r "users" /e
cacls "%SystemRoot%/addins" /r "users" /e
cacls "%SystemRoot%/AppPatch" /r "users" /e
cacls "%SystemRoot%/Connection Wizard" /r "users" /e
cacls "%SystemRoot%/Debug" /r "users" /e
cacls "%SystemRoot%/Driver Cache" /r "users" /e
cacls "%SystemRoot%/Help" /r "users" /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /r "users" /e
cacls "%SystemRoot%/java" /r "users" /e
cacls "%SystemRoot%/msagent" /r "users" /e
cacls "%SystemRoot%/mui" /r "users" /e
cacls "%SystemRoot%/repair" /r "users" /e
cacls "%SystemRoot%/Resources" /r "users" /e
cacls "%SystemRoot%/security" /r "users" /e
cacls "%SystemRoot%/system" /r "users" /e
cacls "%SystemRoot%/TAPI" /r "users" /e
cacls "%SystemRoot%/Temp" /r "users" /e
cacls "%SystemRoot%/twain_32" /r "users" /e
cacls "%SystemRoot%/Web" /r "users" /e
cacls "%SystemRoot%/WinSxS" /r "users" /e
cacls "%SystemRoot%/system32/3com_dmi" /r "users" /e
cacls "%SystemRoot%/system32/administration" /r "users" /e
cacls "%SystemRoot%/system32/Cache" /r "users" /e
cacls "%SystemRoot%/system32/CatRoot2" /r "users" /e
cacls "%SystemRoot%/system32/Com" /r "users" /e
cacls "%SystemRoot%/system32/config" /r "users" /e
cacls "%SystemRoot%/system32/dhcp" /r "users" /e
cacls "%SystemRoot%/system32/drivers" /r "users" /e
cacls "%SystemRoot%/system32/export" /r "users" /e
cacls "%SystemRoot%/system32/icsxml" /r "users" /e
cacls "%SystemRoot%/system32/lls" /r "users" /e
cacls "%SystemRoot%/system32/LogFiles" /r "users" /e
cacls "%SystemRoot%/system32/MicrosoftPassport" /r "users" /e
cacls "%SystemRoot%/system32/mui" /r "users" /e
cacls "%SystemRoot%/system32/oobe" /r "users" /e
cacls "%SystemRoot%/system32/ShellExt" /r "users" /e
cacls "%SystemRoot%/system32/wbem" /r "users" /e
echo.
echo 删除C盘的所有的users的访问权限 ………………ok!
echo.
goto menu
:7
echo 删除C盘Windows下的所有的危险文件夹
attrib %SystemRoot%/Web/printers -s -r -h
del %SystemRoot%\Web\printers\*.* /s /q /f
rd %SystemRoot%\Web\printers /s /q
attrib %SystemRoot%\Help\iisHelp -s -r -h
del %SystemRoot%\Help\iisHelp\*.* /s /q /f
rd %SystemRoot%\Help\iisHelp /s /q
attrib %SystemRoot%\system32\inetsrv\iisadmpwd -s -r -h
del %SystemRoot%\system32\inetsrv\iisadmpwd\*.* /s /q /f
rd %SystemRoot%\system32\inetsrv\iisadmpwd /s /q
echo.
echo 删除C盘Windows下的所有的危险文件夹 ………………ok!
echo.
goto menu
:8
echo 给系统危险文件设置权限设定
cacls "C:\boot.ini" /T /C /E /G Administrators:F
cacls "C:\boot.ini" /D Guests:F /E
cacls "C:\AUTOEXEC.BAT" /T /C /E /G Administrators:F
cacls "C:\AUTOEXEC.BAT" /D Guests:F /E
cacls "%SystemRoot%/system32/net.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/net.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/net1.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/net1.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/cmd.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/cmd.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ftp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ftp.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/netstat.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/netstat.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/regedit.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/regedit.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/at.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/at.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/attrib.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/attrib.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/format.com" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/format.com" /D Guests:F /E
cacls "%SystemRoot%/system32/logoff.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/shutdown.exe" /G Administrators:F
cacls "%SystemRoot%/system32/shutdown.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/telnet.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/telnet.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/wscript.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/wscript.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/doskey.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/doskey.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/help.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/help.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ipconfig.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ipconfig.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/nbtstat.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/nbtstat.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/print.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/print.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/xcopy.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/xcopy.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/edit.com" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/edit.com" /D Guests:F /E
cacls "%SystemRoot%/system32/regedt32.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/regedt32.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/reg.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/reg.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/register.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/register.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/replace.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/replace.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/nwscript.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/nwscript.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/share.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/share.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ping.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ping.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ipsec6.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ipsec6.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/netsh.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/netsh.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/debug.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/debug.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/route.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/route.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/tracert.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/tracert.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/powercfg.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/powercfg.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/nslookup.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/nslookup.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/arp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/arp.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/rsh.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/rsh.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/netdde.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/netdde.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/mshta.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/mshta.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/mountvol.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/mountvol.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/tftp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/tftp.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/setx.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/setx.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/find.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/find.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/finger.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/finger.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/where.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/where.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/regsvr32.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/regsvr32.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/cacls.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/cacls.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/sc.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/sc.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/shadow.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/shadow.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/runas.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/runas.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/wshom.ocx" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/wshom.ocx" /D Guests:F /E
cacls "%SystemRoot%/system32/wshext.dll" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/wshext.dll" /D Guests:F /E
cacls "%SystemRoot%/system32/shell32.dll" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/shell32.dll" /D Guests:F /E
cacls "%SystemRoot%/system32/zipfldr.dll" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/zipfldr.dll" /D Guests:F /E
cacls "%SystemRoot%/PCHealth/HelpCtr/Binaries/msconfig.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/PCHealth/HelpCtr/Binaries/msconfig.exe" /D Guests:F /E
cacls "%SystemRoot%/notepad.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/notepad.exe" /D Guests:F /E
cacls "%SystemRoot%/regedit.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/regedit.exe" /D Guests:F /E
cacls "%SystemRoot%/winhelp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/winhelp.exe" /D Guests:F /E
cacls "%SystemRoot%/winhlp32.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/winhlp32.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/notepad.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/notepad.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/edlin.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/edlin.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/posix.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/posix.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/atsvc.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/atsvc.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/qbasic.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/qbasic.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/runonce.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/runonce.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/syskey.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/syskey.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/cscript.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/cscript.exe" /D Guests:F /E
echo.
echo 给系统危险文件设置权限设定 ………………ok!
echo.
goto menu
:9
echo 注册表相关设定
reg delete HKEY_CLASSES_ROOT\WScript.Shell /f
reg delete HKEY_CLASSES_ROOT\WScript.Shell.1 /f
reg delete HKEY_CLASSES_ROOT\Shell.application /f
reg delete HKEY_CLASSES_ROOT\Shell.application.1 /f
reg delete HKEY_CLASSES_ROOT\WSCRIPT.NETWORK /f
reg delete HKEY_CLASSES_ROOT\WSCRIPT.NETWORK.1 /f
regsvr32 /s /u wshom.ocx
regsvr32 /s /u wshext.dll
regsvr32 /s /u shell32.dll
regsvr32 /s /u zipfldr.dll
echo.
echo 注册表相关设定 ………………ok!
echo.
goto menu
:3
echo 添加iis_wpg的访问权限
cacls "%SystemRoot%" /g iis_wpg:r /e
cacls "%SystemDrive%/Program Files/Common Files" /g iis_wpg:r /e
cacls "%SystemRoot%/Downloaded Program Files" /g iis_wpg:c /e
cacls "%SystemRoot%/Help" /g iis_wpg:c /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /g iis_wpg:c /e
cacls "%SystemRoot%/Offline Web Pages" /g iis_wpg:c /e
cacls "%SystemRoot%/System32" /g iis_wpg:c /e
cacls "%SystemRoot%/Tasks" /g iis_wpg:c /e
cacls "%SystemRoot%/Temp" /g iis_wpg:c /e
cacls "%SystemRoot%/Web" /g iis_wpg:c /e
echo.
echo 添加iis_wpg的访问权限 ………………ok!
echo.
goto menu
:4
echo 添加iis_wpg的访问权限[.net专用]
cacls "%SystemRoot%/Assembly" /g iis_wpg:c /e
cacls "%SystemRoot%/Microsoft.NET" /g iis_wpg:c /e
echo.
echo 添加iis_wpg的访问权限[.net专用] ………………ok!
echo.
goto menu
:5
echo 添加iis_wpg的访问权限[装了MACFEE的软件专用]
cacls "%SystemDrive%/Program Files/Network Associates" /g iis_wpg:r /e
echo.
echo 添加iis_wpg的访问权限[装了MACFEE的软件专用] ………………ok!
echo.
goto menu
:6
echo 添加users的访问权限
cacls "%SystemRoot%/temp" /g users:c /e
echo.
echo 添加users的访问权限 ………………ok!
echo.
goto menu
:10
echo 将C盘权限还原为默认
Secedit /configure /db %SYSTEMROOT%\security\database\cvtfs.sdb /Cfg "%SYSTEMROOT%\security\templates\setup security.inf" /areas filestore
goto menu
:exit
exit
将上面代码保存为XX.bat 即可设置服务器磁盘安全
其实青云的批处理也不错的,大家可以根据需要选择下载地址 https://www.jb51.net/softs/12762.html
@ECHO OFF
title C盘权限批量处理-2010.7.1
echo -----------------------------
echo 服务器C盘权限设置
echo https://www.jb51.net
echo -----------------------------
:menu
echo.
echo [1] 删除C盘的everyone的权限
echo [2] 删除C盘的所有的users的访问权限
echo [3] 添加iis_wpg的访问权限
echo [4] 添加iis_wpg的访问权限[.net专用]
echo [5] 添加iis_wpg的访问权限[装了MACFEE的软件专用]
echo [6] 添加users的访问权限
echo [7] 删除C盘Windows下的所有的危险文件夹
echo [8] 删除系统危险文件的访问权限,只留管理组成员
echo [9] 注册表相关设定
echo [10] 将C盘权限还原为默认[需重启]
echo [0] 退出
echo.
@echo 请选择?
@echo 输入上面的选项回车
@echo off
set /p menu=
if %menu% == 0 goto exit
if %menu% == 1 goto 1
if %menu% == 2 goto 2
if %menu% == 3 goto 3
if %menu% == 4 goto 4
if %menu% == 5 goto 5
if %menu% == 6 goto 6
if %menu% == 7 goto 7
if %menu% == 8 goto 8
if %menu% == 9 goto 9
if %menu% == 10 goto 10
:1
echo 删除C盘的everyone的权限
cacls "%SystemDrive%" /r "CREATOR OWNER" /e
cacls "%SystemDrive%" /r "everyone" /e
cacls "%SystemRoot%" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings/All Users" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings/All Users/Documents" /r "everyone" /e
echo.
echo 删除C盘的everyone的权限 ………………ok!
echo.
goto menu
:2
echo 删除C盘的所有的users的访问权限
cacls "%SystemDrive%" /r "users" /e
cacls "%SystemDrive%/Program Files" /r "users" /e
cacls "%SystemDrive%/Documents and Settings" /r "users" /e
cacls "%SystemRoot%" /r "users" /e
cacls "%SystemRoot%/addins" /r "users" /e
cacls "%SystemRoot%/AppPatch" /r "users" /e
cacls "%SystemRoot%/Connection Wizard" /r "users" /e
cacls "%SystemRoot%/Debug" /r "users" /e
cacls "%SystemRoot%/Driver Cache" /r "users" /e
cacls "%SystemRoot%/Help" /r "users" /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /r "users" /e
cacls "%SystemRoot%/java" /r "users" /e
cacls "%SystemRoot%/msagent" /r "users" /e
cacls "%SystemRoot%/mui" /r "users" /e
cacls "%SystemRoot%/repair" /r "users" /e
cacls "%SystemRoot%/Resources" /r "users" /e
cacls "%SystemRoot%/security" /r "users" /e
cacls "%SystemRoot%/system" /r "users" /e
cacls "%SystemRoot%/TAPI" /r "users" /e
cacls "%SystemRoot%/Temp" /r "users" /e
cacls "%SystemRoot%/twain_32" /r "users" /e
cacls "%SystemRoot%/Web" /r "users" /e
cacls "%SystemRoot%/WinSxS" /r "users" /e
cacls "%SystemRoot%/system32/3com_dmi" /r "users" /e
cacls "%SystemRoot%/system32/administration" /r "users" /e
cacls "%SystemRoot%/system32/Cache" /r "users" /e
cacls "%SystemRoot%/system32/CatRoot2" /r "users" /e
cacls "%SystemRoot%/system32/Com" /r "users" /e
cacls "%SystemRoot%/system32/config" /r "users" /e
cacls "%SystemRoot%/system32/dhcp" /r "users" /e
cacls "%SystemRoot%/system32/drivers" /r "users" /e
cacls "%SystemRoot%/system32/export" /r "users" /e
cacls "%SystemRoot%/system32/icsxml" /r "users" /e
cacls "%SystemRoot%/system32/lls" /r "users" /e
cacls "%SystemRoot%/system32/LogFiles" /r "users" /e
cacls "%SystemRoot%/system32/MicrosoftPassport" /r "users" /e
cacls "%SystemRoot%/system32/mui" /r "users" /e
cacls "%SystemRoot%/system32/oobe" /r "users" /e
cacls "%SystemRoot%/system32/ShellExt" /r "users" /e
cacls "%SystemRoot%/system32/wbem" /r "users" /e
echo.
echo 删除C盘的所有的users的访问权限 ………………ok!
echo.
goto menu
:7
echo 删除C盘Windows下的所有的危险文件夹
attrib %SystemRoot%/Web/printers -s -r -h
del %SystemRoot%\Web\printers\*.* /s /q /f
rd %SystemRoot%\Web\printers /s /q
attrib %SystemRoot%\Help\iisHelp -s -r -h
del %SystemRoot%\Help\iisHelp\*.* /s /q /f
rd %SystemRoot%\Help\iisHelp /s /q
attrib %SystemRoot%\system32\inetsrv\iisadmpwd -s -r -h
del %SystemRoot%\system32\inetsrv\iisadmpwd\*.* /s /q /f
rd %SystemRoot%\system32\inetsrv\iisadmpwd /s /q
echo.
echo 删除C盘Windows下的所有的危险文件夹 ………………ok!
echo.
goto menu
:8
echo 给系统危险文件设置权限设定
cacls "C:\boot.ini" /T /C /E /G Administrators:F
cacls "C:\boot.ini" /D Guests:F /E
cacls "C:\AUTOEXEC.BAT" /T /C /E /G Administrators:F
cacls "C:\AUTOEXEC.BAT" /D Guests:F /E
cacls "%SystemRoot%/system32/net.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/net.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/net1.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/net1.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/cmd.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/cmd.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ftp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ftp.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/netstat.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/netstat.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/regedit.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/regedit.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/at.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/at.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/attrib.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/attrib.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/format.com" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/format.com" /D Guests:F /E
cacls "%SystemRoot%/system32/logoff.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/shutdown.exe" /G Administrators:F
cacls "%SystemRoot%/system32/shutdown.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/telnet.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/telnet.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/wscript.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/wscript.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/doskey.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/doskey.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/help.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/help.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ipconfig.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ipconfig.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/nbtstat.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/nbtstat.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/print.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/print.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/xcopy.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/xcopy.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/edit.com" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/edit.com" /D Guests:F /E
cacls "%SystemRoot%/system32/regedt32.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/regedt32.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/reg.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/reg.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/register.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/register.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/replace.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/replace.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/nwscript.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/nwscript.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/share.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/share.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ping.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ping.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/ipsec6.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/ipsec6.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/netsh.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/netsh.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/debug.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/debug.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/route.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/route.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/tracert.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/tracert.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/powercfg.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/powercfg.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/nslookup.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/nslookup.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/arp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/arp.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/rsh.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/rsh.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/netdde.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/netdde.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/mshta.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/mshta.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/mountvol.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/mountvol.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/tftp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/tftp.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/setx.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/setx.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/find.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/find.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/finger.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/finger.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/where.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/where.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/regsvr32.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/regsvr32.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/cacls.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/cacls.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/sc.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/sc.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/shadow.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/shadow.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/runas.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/runas.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/wshom.ocx" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/wshom.ocx" /D Guests:F /E
cacls "%SystemRoot%/system32/wshext.dll" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/wshext.dll" /D Guests:F /E
cacls "%SystemRoot%/system32/shell32.dll" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/shell32.dll" /D Guests:F /E
cacls "%SystemRoot%/system32/zipfldr.dll" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/zipfldr.dll" /D Guests:F /E
cacls "%SystemRoot%/PCHealth/HelpCtr/Binaries/msconfig.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/PCHealth/HelpCtr/Binaries/msconfig.exe" /D Guests:F /E
cacls "%SystemRoot%/notepad.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/notepad.exe" /D Guests:F /E
cacls "%SystemRoot%/regedit.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/regedit.exe" /D Guests:F /E
cacls "%SystemRoot%/winhelp.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/winhelp.exe" /D Guests:F /E
cacls "%SystemRoot%/winhlp32.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/winhlp32.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/notepad.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/notepad.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/edlin.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/edlin.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/posix.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/posix.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/atsvc.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/atsvc.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/qbasic.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/qbasic.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/runonce.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/runonce.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/syskey.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/syskey.exe" /D Guests:F /E
cacls "%SystemRoot%/system32/cscript.exe" /T /C /E /G Administrators:F
cacls "%SystemRoot%/system32/cscript.exe" /D Guests:F /E
echo.
echo 给系统危险文件设置权限设定 ………………ok!
echo.
goto menu
:9
echo 注册表相关设定
reg delete HKEY_CLASSES_ROOT\WScript.Shell /f
reg delete HKEY_CLASSES_ROOT\WScript.Shell.1 /f
reg delete HKEY_CLASSES_ROOT\Shell.application /f
reg delete HKEY_CLASSES_ROOT\Shell.application.1 /f
reg delete HKEY_CLASSES_ROOT\WSCRIPT.NETWORK /f
reg delete HKEY_CLASSES_ROOT\WSCRIPT.NETWORK.1 /f
regsvr32 /s /u wshom.ocx
regsvr32 /s /u wshext.dll
regsvr32 /s /u shell32.dll
regsvr32 /s /u zipfldr.dll
echo.
echo 注册表相关设定 ………………ok!
echo.
goto menu
:3
echo 添加iis_wpg的访问权限
cacls "%SystemRoot%" /g iis_wpg:r /e
cacls "%SystemDrive%/Program Files/Common Files" /g iis_wpg:r /e
cacls "%SystemRoot%/Downloaded Program Files" /g iis_wpg:c /e
cacls "%SystemRoot%/Help" /g iis_wpg:c /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /g iis_wpg:c /e
cacls "%SystemRoot%/Offline Web Pages" /g iis_wpg:c /e
cacls "%SystemRoot%/System32" /g iis_wpg:c /e
cacls "%SystemRoot%/Tasks" /g iis_wpg:c /e
cacls "%SystemRoot%/Temp" /g iis_wpg:c /e
cacls "%SystemRoot%/Web" /g iis_wpg:c /e
echo.
echo 添加iis_wpg的访问权限 ………………ok!
echo.
goto menu
:4
echo 添加iis_wpg的访问权限[.net专用]
cacls "%SystemRoot%/Assembly" /g iis_wpg:c /e
cacls "%SystemRoot%/Microsoft.NET" /g iis_wpg:c /e
echo.
echo 添加iis_wpg的访问权限[.net专用] ………………ok!
echo.
goto menu
:5
echo 添加iis_wpg的访问权限[装了MACFEE的软件专用]
cacls "%SystemDrive%/Program Files/Network Associates" /g iis_wpg:r /e
echo.
echo 添加iis_wpg的访问权限[装了MACFEE的软件专用] ………………ok!
echo.
goto menu
:6
echo 添加users的访问权限
cacls "%SystemRoot%/temp" /g users:c /e
echo.
echo 添加users的访问权限 ………………ok!
echo.
goto menu
:10
echo 将C盘权限还原为默认
Secedit /configure /db %SYSTEMROOT%\security\database\cvtfs.sdb /Cfg "%SYSTEMROOT%\security\templates\setup security.inf" /areas filestore
goto menu
:exit
exit
将上面代码保存为XX.bat 即可设置服务器磁盘安全
其实青云的批处理也不错的,大家可以根据需要选择下载地址 https://www.jb51.net/softs/12762.html
标签:
磁盘权限,安全设置
幽灵资源网 Design By www.bzswh.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
幽灵资源网 Design By www.bzswh.com
暂无评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。