@echo off %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d "%~dp0" set str=%date:~0,7% set strs=baili%str:-=% net user %username% %strs% pushd E: ren 输出数据.txt temp.txt echo %strs%>输出数据.txt type temp.txt>>输出数据.txt del temp.txt ::这一段是我用来输出密码的,就是怕自己忘了,已注释 @echo 成功修改 任意键继续 rundll32 user32.dll,LockWorkStation ::修改成功后自动锁屏 pause