- UID
- 47925
中尉
- 积分
- 9874
- 经验
-
- 点数
-
- 油豆
-
- 荣誉
-
- 在线时间
- 小时
- 注册时间
- 2009-4-19
- 最后登录
- 1970-1-1
|
本帖最后由 ssqj111 于 2012-6-18 11:37 编辑
无意中看到的,未测试,这里空闲,留做备用
- :::: 限制用户更改系统时间 By FastSLZ 2009-6-1 CMD WinXP SP2 or WinXP SP3
- @echo off&SetLocal EnableDelayedExpansion
- set "SecPath=%WINDIR%\security\Database"
- cd.>"%SecPath%\sec.cfg"
- if not exist "%SecPath%\sec.bak" secedit /export /cfg "%SecPath%\sec.bak" /quiet
- for /f "delims=" %%i in ('type "%SecPath%\sec.bak"') do (
- set "var=%%i"
- if "!var:~0,21!"=="SeSystemtimePrivilege" (>>"%SecPath%\sec.cfg" echo SeSystemtimePrivilege =) else >>"%SecPath%\sec.cfg" echo/!var!
- )
- secedit /configure /db "%SecPath%\sec.sdb" /cfg "%SecPath%\sec.cfg" /quiet
- gpupdate /force >nul
- echo 重启生效!&pause>nul
复制代码
- @echo off
- ::::还原系统时间可更改状态
- secedit /configure /db "%SecPath%\sec.sdb" /cfg "%SecPath%\sec.bak" /quiet
- gpupdate /force >nul
- echo 重启生效!&pause>nul
复制代码
|
|