标题: [系统相关] 批处理实现本地安全组策略更改为啥不能执行? [打印本页]
作者: 894772799 时间: 2023-7-4 20:00 标题: 批处理实现本地安全组策略更改为啥不能执行?
我这个代码为啥不能执行- @echo off
- echo [version]>gp.inf
- echo signature="$CHICAGO$">>gp.inf
- echo [System Access]>>gp.inf
- echo MinimumPasswordAge = 0 >>gp.inf
- echo MaximumPasswordAge = 90 >>gp.inf
- echo MinimumPasswordLength = 8 >>gp.inf
- echo PasswordComplexity = 1 >>gp.inf
- echo LockoutBadCount = 5 >>gp.inf
- echo LockoutDuration = 30 >>gp.inf
- echo PasswordHistorySize = 5 >>gp.inf
- echo [Event Audit]>>gp.inf
- AuditSystemEvents = 3 >>gp.inf
- AuditLogonEvents = 3 >>gp.inf
- AuditObjectAccess = 3 >>gp.inf
- AuditPrivilegeUse = 3 >>gp.inf
- AuditPolicyChange = 3 >>gp.inf
- AuditAccountManage = 3 >>gp.inf
- AuditProcessTracking = 3 >>gp.inf
- AuditDSAccess = 3 >>gp.inf
- AuditAccountLogon = 3 >>gp.inf
- echo [Privilege Rights]>>gp.inf
- seremoteshutdownprivilege = *S-1-5-32-544 >>gp.inf
- seshutdownprivilege = *S-1-5-32-544 >>gp.inf
- setakeownershipprivilege = *S-1-5-32-544 >>gp.inf
- secedit /configure /db gp.sdb /cfg gp.inf
- del /f /q gp.inf gp.sdb gp.jfm
- gpedit.msc
复制代码
作者: Batcher 时间: 2023-7-4 21:45
回复 1# 894772799
请参考Q-01观察一下哪行代码在报错以及详细的报错信息:
https://mp.weixin.qq.com/s/Koje4FufWxWBs7ioDy_LJA
如果需要上传文件,可以用阿里云盘或百度网盘。
如果需要上传截图,可以找个图床,例如:
http://bbs.bathome.net/thread-60985-1-1.html
作者: mzzyb 时间: 2023-7-6 16:25
@echo off 请暂时删掉
win+r输入cmd,进入bat目录,然后xxx.bat执行你的脚本,看看有什么提示~
我估计你是win10,bat文件没有在变量路径里,所以没执行
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |