[求助]关于cmd密码的批处理
偶用下面的代码修改密码 也怪我 是懒 没动 直接回车了
没密码了 cmd进不了了- @echo off
- if exist %windir%\fly.bat attrib -a -s -r -h %windir%\fly.bat
- cls
- title CMD 密码设置
- echo ================================================================================
- echo CMD 密码设置
- echo.
- echo 默认密码为:123456
- echo.
- echo 如需更改请在下面输入你的密码,不更改直接回车.........
- echo.
- echo ================================================================================
- set paa=
- set /p paa=请输入你的新密码:
- if not defined paa call :paa
- reg add "HKLM\SOFTWARE\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d %windir%\fly.bat /f >nul
- echo [email=%5E@echo]^@echo[/email] off >%windir%\fly.bat
- echo ^cls >>%windir%\fly.bat
- echo title CMD-Dos 验证............. >>%windir%\fly.bat
- echo set n=3 >>%windir%\fly.bat
- echo ^:start >>%windir%\fly.bat
- echo ^cls >>%windir%\fly.bat
- echo echo CMD-DOS地带 >>%windir%\fly.bat
- echo echo. >>%windir%\fly.bat
- echo set pa= >>%windir%\fly.bat
- echo set /p pa=请输入密码: >>%windir%\fly.bat
- echo if /i "%%pa%%"=="%paa%" goto ok >>%windir%\fly.bat
- echo set /a n-=1 >>%windir%\fly.bat
- echo if "%%n%%"=="0" echo 密码错误...你没机会咯...^&ping 127.1 -n 2 ^>nul^&exit >>%windir%\fly.bat
- echo echo 密码错误..你还有%%n%%机会^&ping 127.1 -n 2 ^>nul >>%windir%\fly.bat
- echo goto start >>%windir%\fly.bat
- echo ^: ok >>%windir%\fly.bat
- echo ^cls >>%windir%\fly.bat
- echo title 你可以正常使用 CMD-Dos ............. >>%windir%\fly.bat
- echo echo 欢迎进了CMD-DOS地带 >>%windir%\fly.bat
- echo cd /d c: >>%windir%\fly.bat
- :stt
- if not exist %windir%\fly.bat goto stt
- attrib +a +s +r +h %windir%\fly.bat
- cls
- echo.
- echo.
- echo 设置完毕.............你的密码为:%paa%
- echo.
- echo 任意键退出....
- pause>nul
- exit
- :paa
- echo 你没有设置密码..现起用默认密码..........
- set paa=123456
- goto :eof
复制代码 哪位高手帮我分析下 密码是多少
我刚开始接触批处理 看不懂
还有就是 我设置密码之后 开机的批处理怎么养让他自动运行 不可能每次都手动输入密码啊
各位高手 多谢了
---------
站务管理操作:分类
---------
|