Loading

常用批处理脚本

IP地址查看

@echo 逝去的风

ipconfig/all

pause;

本地用户和组

@echo 逝去的风

start lusrmgr.msc

创建新的bat文件

@echo 逝去的风

fsutil file createnew "新建文本.bat" 0

启动画图

@echo 逝去的风

start mspaint

清除临时文件

@echo off 
echo 正在清除系统LJ文件,请稍等...... 
del /f /s /q %systemdrive%\*.tmp 
del /f /s /q %systemdrive%\*._mp 
del /f /s /q %systemdrive%\*.log 
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\*.* 
rd /s /q %windir%\temp & md %windir%\temp 
del /f /q %userprofile%\小甜饼s\*.* 
del /f /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 清除系统LJ完成! 
echo. & pause 

打开设备管理器

@echo 逝去的风

start devmgmt.msc

打开注册表

@echo off

rem 逝去的风

start regedit.exe

pause

XP系统服务及优化

@echo off 
@net share C$ /del 
@net share d$ /del
@net share e$ /del
@net share f$ /del 
@net share ipc$ /del 
@net share admin$ /del 
@net start "computer browser"
@net start "Workstation"
@net start "Server"
@net start "DHCP client"
@net start "DNS client"
@net start "remote access connection manager" 
@net start "Network Connections"
@net start "Telnet"
@net start "Remote Desktop Help Session Manager"
@net start "netmeeting remote desktop sharing"
@net start "Terminal Services"
@net start "remote procedure call (rpc)"
@net start "Routing and Remote Access"
@Net start "Spooler"

@reg import 打开启动优化功能.reg
@reg import 关闭administrator.reg
@reg import 加快程序运行速度.reg
@reg import 加快局域网访问速度.reg
@reg import 加速XP的开关机.reg
@reg import 加速进程与选单.reg
@reg import 减少开机滚动条滚动次数.reg
@reg import 禁未读邮件.reg
@reg import 完全禁用系统还原.reg
@reg import 停止磁盘空间不足警告.reg
@reg import EXE关联文件修复.reg
@reg import 彻底关闭Dr_Warson.reg
@reg import 关闭XP文件保护.reg
@reg import 禁止远程修改注册表.reg
@reg import 开启CPU(256k)二级缓存,加速系统核心处理进程.reg
@reg import 开启硬件优化.REG
@reg import 启动预读和程序预读可以减少启动时间.reg
@reg import 让欢迎窗口更清晰.reg
@reg import 删除图标快捷方式的字样.reg
@reg import 锁定IE的下载功能.reg

@pause
@regsvr32 /u zipfldr.dll

备份服务原始状态

@echo off
rem  get current date and time
for /f "tokens=1, 2, 3, 4 delims=-/. " %%j in ('Date /T') do set FILENAME=srv_%%j_%%k_%%l_%%m
for /f "tokens=1, 2 delims=: " %%j in ('TIME /T') do set FILENAME=%FILENAME%_%%j_%%k.bat

rem get all service name
sc query type= service state= all| findstr /r /C:"SERVICE_NAME:" >tmpsrv.txt
echo Save Service Start State In %FILENAME%
rem save service start state into batch file 
rem

echo @echo Restore The Service Start State Saved At %TIME% %DATE% >"%FILENAME%" 
echo @pause >>"%FILENAME%"

for /f "tokens=2 delims=:" %%j in (tmpsrv.txt) do @( sc qc %%j |findstr  START_TYPE >tmpstype.txt &&  for /f "tokens=4 delims=:_ " %%s in ( tmpstype.txt) do @echo sc config  %%j start= %%s >>"%FILENAME%")
echo @pause >>"%FILENAME%"

del tmpsrv.txt
del tmpstype.txt
posted @ 2023-04-12 15:17  sunnydoy  阅读(47)  评论(0编辑  收藏  举报