当前位置: 首页 > news >正文

记录一下我最近一年写的脚本,不知不觉近100个了!

记录一下我最近一年写的脚本,不知不觉近100个了!

1

 

2

 

3

 

一个系统初始化的脚本

@echo off
echo 右击鼠标以管理员身份运行,按任意键退出

echo 开启远程桌面连接
Wmic OS Get Caption | Findstr /i "7" >nul && goto win7
Wmic OS Get Caption | Findstr /i "10 11" >nul && goto win10
:win7
wmic RDTOGGLE WHERE ServerName='%COMPUTERNAME%' call SetAllowTSConnections 1 2>nul | find "successful" >nul && (echo Success^^!) || (echo Failure^^!)
goto next
:win10
wmic RDTOGGLE WHERE ServerName='%COMPUTERNAME%' call SetAllowTSConnections 1 2>nul | find "方法执行成功" >nul && (echo Success^^!) || (echo Failure^^!)
:next

echo 打开防火墙
netsh advfirewall set allprofiles state on| find "确定" >nul && (echo Success^^!) || (echo Failure^^!)

echo 禁用IPv6
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" /v DisabledComponents /t REG_DWORD /d 255 /f | find "操作成功" >nul && (echo Success^^!) || (echo Failure^^!)

echo 设置DNS服务器
netsh interface ip set dns "Ethernet0" static 192.168.0.11 primary
if %errorlevel% equ 0 (
echo DNS添加成功
) else (
echo DNS添加失败,错误代码: %errorlevel%
)

netsh interface ip add dns "Ethernet0" 114.114.114.114
if %errorlevel% equ 0 (
echo 备用DNS添加成功
) else (
echo DNS添加失败,错误代码: %errorlevel%
)

echo 解决Edge、Chrome提示“兼容性问题”
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge" /v RendererCodeIntegrityEnabled /d 0 /t REG_DWORD /f | find "操作成功完成" >nul && (echo Success^^!) || (echo Failure^^!)
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome" /v RendererCodeIntegrityEnabled /d 0 /t REG_DWORD /f | find "操作成功完成" >nul && (echo Success^^!) || (echo Failure^^!)


echo 解决共享打印机连接数问题
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v autodisconnect /t REG_DWORD /d 15 /f | find "操作成功完成" >nul && (echo Success^^!) || (echo Failure^^!)


echo 设置时区为中国标准时间
tzutil /s "China Standard Time" >nul && (echo Success^^!) || (echo Failure^^!)

echo 禁用Office上传中心
reg add "HKCU\Software\Microsoft\Office\16.0\Common" /v QMEnable /t REG_DWORD /d 0 /f | find "操作成功完成" >nul && (echo Success^^!) || (echo Failure^^!)

echo 启用长路径支持(Win10+)
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f | find "操作成功完成" >nul && (echo Success^^!) || (echo Failure^^!)

pause

 

http://www.jsqmd.com/news/26070/

相关文章:

  • The 2025 Hunan Collegiate Programming Contest
  • List of my problems
  • 歌声转换SVC主流方法原理剖析1 — DDSP-SVC
  • SpringBoot整合邮件发送
  • vyos syslog配置
  • Unity3D URP中材质设置emission自发光但是没有辉光Bloom效果
  • Ishibuchi教授与Lie Meng Pang博士受邀于本课题组开展学术交流与指导
  • 【倒计时10天】第20届国际生物启发式计算:理论与应用会议(BIC-TA 2025)将于2025年11月7-9日在武汉召开!
  • [TOOL] hexdump: 二进制文件阅读指南
  • 题解:CodeForces 715E Complete the Permutations
  • [TOOL] hexdump: 二进制文件分析指南
  • Day26-C:\Users\Lenovo\Desktop\note\code\JavaSE\Basic\src\com\Threadcase
  • 题解:CF715E Complete the Permutations
  • 日总结 20
  • 重组蛋白与传统蛋白的区别:从来源到特性的全面解析
  • 交个朋友电商学苑直播运营集训班4.0第三天笔记
  • 网球馆自动预约框架的反调试
  • 吃薯片2025有机 - Gon
  • [TOOL] 个人必备工具
  • JTCatch 缓存部署与使用
  • CSP-S 2025 游记
  • arm.dll armaccess.dll arkut.dll arkdd32.dll arizonadll.dll aritmoperacedll.dll ariesengine.dll - 实践
  • 顺利通过试用期:避开三大陷阱,掌握三个关键点
  • UOS镜像下载
  • NordicNRF91系列蜂窝产品在偏远地区低轨道卫星物联网连接领域取得关键突破
  • 深入解析:Inception V3--J9
  • ODT 学习笔记
  • Aout Me!
  • gccgo如何实现golang运行时向特定interface的动态conversion(及和C++虚函数表的对比)
  • 技术人的公关利器:专业新闻稿撰写AI指令深度解析