• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell
您的位置:首页 > 脚本语言 >DOS/BAT > 批处理设置windows服务器的代码ThecSafe1.9.4第1/3页

批处理设置windows服务器的代码ThecSafe1.9.4第1/3页

作者: 字体:[增加 减小] 来源:互联网

通过本文主要向大家介绍了socket服务器端代码,服务器测速代码,服务器端代码,我的世界服务器代码,服务器代码等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
@Echo Off
TITLE  常来网服务器高级安全设置器

:start
CLS
COLOR 1f
Rem 使用COLOR命令对控制台输出颜色进行更改
MODE con: COLS=32 LINES=21
Rem MODE语句为设定窗体的宽和高
Set tm1=%time:~0,2%
Set tm2=%time:~3,2%
Set tm3=%time:~6,2%
Echo %date% %tm1%点%tm2%分%tm3%秒 
Echo ================================
Echo 请选择要进行的操作,然后按回车
Echo ───────────────
Echo.
Echo A. 一键搞定/全自动设置服务器
Echo 0. 清理系统垃圾文件
Echo 1. 给系统危险文件设置权限
Echo 2. 给系统危险文件夹设置权限
Echo 3. 系统服务优化
Echo 4. 注册表危险组件删除
Echo 5. 防DDOS洪水攻击处理
Echo 6. 导入常来网专用安全策略
Echo 7. 重启IIS使设置生效
Echo 8. 刷新当前时间
Echo 9. 锁定计算机
Echo L. 注销当前用户
Echo Q. 退出安全设置器
Echo.

:cho 
Set Choice=
Set /P Choice=选择:
Rem 设定变量"Choice"为用户输入的字符
If Not "%Choice%"=="" Set Choice=%Choice:~0,1%
Rem 如果输入大于1位,取第1位,比如输入132,则返回值为1
Echo.
If /I "%Choice%"=="A" Goto Auto
If /I "%Choice%"=="0" Goto Clear
If /I "%Choice%"=="1" Goto SetFile
If /I "%Choice%"=="2" Goto SetFolder
If /I "%Choice%"=="3" Goto Service
If /I "%Choice%"=="4" Goto Reg
If /I "%Choice%"=="5" Goto Ddos
If /I "%Choice%"=="6" Goto Ipsec
If /I "%Choice%"=="7" Goto restartiis
If /I "%Choice%"=="8" Goto start
If /I "%Choice%"=="9" Goto lock
If /I "%Choice%"=="L" Goto logoff
If /I "%Choice%"=="Q" Goto End
Rem 为避免出现返回值为空或含空格而导致程序异常,需在变量外另加双引号
Rem 注意,If语句需要双等于号
Rem 如果输入的字符不是以上数字,将返回重新输入
Echo 选择无效,请重新输入
Echo.
Goto cho

:Clear
CLS
MODE con: COLS=80 LINES=18
COLOR 70
Echo.
Echo 正在清理系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
del /f /s /q %windir%\temp\*.*
del /f /s /q %userprofile%\cookies\*.*
del /f /s /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"

Echo 清理系统垃圾完成! 请按任意键返回并选1继续...
PAUSE >nul
Goto start

:SetFile
CLS
MODE con: COLS=80 LINES=18
COLOR 70
Echo.
Rem 删除系统危险文件的访问权限,只留管理组成员

cscript.exe xcacls.vbs "%SystemDrive%/boot.ini" /G Administrators:F
cscript.exe xcacls.vbs "%SystemDrive%/boot.ini" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemDrive%/AUTOEXEC.BAT" /G Administrators:F
cscript.exe xcacls.vbs "%SystemDrive%/AUTOEXEC.BAT" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemDrive%/Program Files/Internet Explorer/iexplore.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemDrive%/Program Files/Internet Explorer/iexplore.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/net.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/net.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/net1.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/net1.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/cmd.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/cmd.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/ftp.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/ftp.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/scrrun.dll" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/scrrun.dll" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/shell.dll" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/shell.dll" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/netstat.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/netstat.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/regedit.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/regedit.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/secedit.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/secedit.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/gpresult.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/gpresult.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/gpupdate.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/gpupdate.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/at.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/at.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/attrib.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/attrib.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/format.com" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/format.com" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/logoff.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/logoff.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/shutdown.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/shutdown.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/telnet.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/telnet.exe" /D Guests:F /E

cscript.exe xcacls.vbs "%SystemRoot%/system32/wscript.exe" /G Administrators:F
cscript.exe xcacls.vbs "%SystemRoot%/system32/wscript.exe" /D Guests:F&

您可能想查找下面的文章:

  • 批处理设置windows服务器的代码ThecSafe1.9.4第1/3页
  • 批处理设置windows服务器的代码ThecSafe1.9.4第1/3页

相关文章

  • 枚举显示批处理bat
  • cmd模式下中文乱码的解决方法(注册表)
  • 收藏的比较完整的批处理教程第1/2页
  • 炫酷的批处理BAT走字特效源码
  • 实现WIN2003 IIS最小权限分配的批处理
  • dos下用recover修复损坏的TXT文件
  • 出给新手的数值排序加分题
  • DOS批处理 函数定义与用法
  • 零磁道受损的软盘格式化小技巧
  • 用批处理解决数学问题的代码第1/4页

文章分类

  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell

最近更新的内容

    • cmd forfiles 从文件夹或树中选择要进行批处理的文件(方便批量删除n天前的文件)
    • Xcopy命令参数使用介绍
    • DOS下FTP命令(FTP命令全集)
    • BAT批处理中使用数组示例
    • Windows批处理双击切换IP地址方便、快捷
    • PHP 清除HTML代码、空格、回车换行符的函数
    • BAT版文件粉碎器
    • DOS自带的批处理命令
    • 创建dos命令窗口快捷方式的批处理
    • dos 删除文件夹 rd

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有