本帖最后由 flashercs 于 2020-6-11 16:26 编辑
- @echo off
- REM 安全设置\本地策略\用户权利指派\更改系统时间,添加指定用户
- net session >nul 2>&1
- if errorlevel 1 (
- mshta vbscript:CreateObject("Shell.Application"^).ShellExecute("%~s0","","","runas",1^)(window.close^)
- exit /b
- )
- %1 %2
- cd /d "%~dp0"
- REM Change System Time
- cmd /u /c ""%~f0" goto settings"
- secedit /configure /db "%~dp0ChangeTime.sdb" /cfg "%~dp0ChangeTime.inf" /log "%~dp0ChangeTime.log" /overwrite /quiet
-
- exit /b
-
- :settings
- set username=fy
- >".\ChangeTime.inf" (
- echo [Unicode]
- echo Unicode=yes
- echo [Version]
- echo signature="$CHICAGO$"
- echo Revision=1
- echo [Registry Values]
- echo [Profile Description]
- echo Description=安全设置\本地策略\用户权利指派\更改系统时间,添加指定用户
- echo [Privilege Rights]
- echo SeSystemtimePrivilege = *S-1-5-19,*S-1-5-32-544,%username%
- )
复制代码
|