求教大神find参数问题
cmd吧
全部回复
仅看楼主
level 1
find /i ”%password%“ pass.txt
if "%errorlevel%"=="0" (goto Yes) else (goto enter)
改了很多次,就是一个问题:find参数格式不正确或此时不能有(貌似是)goto。
最后改的成这样:还是不行
2016年10月06日 07点10分 1
level 1
:start
taskkill /f /im explorer.exe >nul
start /d "E:\my home\Login" check64.exe
@echo off
cls
title Login
echo Loading...
ping 127.0.0.1 -n 4 >nul
pause
cls
goto enter
:enter
set /p username=Please enter you username:
cls
echo %username%
set /p choice=y/n?
if %choice%==y goto if
if %choice%==n goto enter
if not %choice%==* goto start
:if
cls
if %username%==* Goto user
if %username%==me Goto Godmode
if %username%== Goto enter
if not %username%==* Goto userend
:user
cls
find /i %username% user.txt
if errorlever 1 goto usend
if errorlever 0 goto login
:Godmode
cls
set /p passwordG= Please enter you password:
find /i %passwordG% godmode.txt
if %errorlever%==0 goto Yes
if %errorlever%==1 goto enter
:login
cls
set password=
set /p password=Please enter you password:
find /i %password% %username%.txt
if %errorlever%==0 goto Yes
if %errorlever%==1 goto enter
:Yes
cls
start /d "E:\my home\Login" checkcmd.exe
start explorer.exe
exit
:userend
cls
shutdown -s -f -t 50
set /p em=Enter you emergency password:
find /i %em% Emergency.txt
if %errorlever%==0 goto enter
if %errorlever%==1 goto die
:die
shutdown -a
shutdown -s -f -t 0
exit
:usend
cls
echo This username is false.
pause
goto enter
2016年10月06日 07点10分 2
全部代码,前面都没问题,就是到find部分出问题
2016年10月06日 07点10分
1