我正在從註冊文件(signup.cmd)調用登錄變量的批處理文件(login.cmd);但我不知道如何去做。批處理文件登錄
signup.cmd
::Copyright 2014 Krii.
@echo off
color f0
title Sign Up
echo Welcome,
set /p usern=Choose Username:
set /p passwd=Choose Password:
set /p bd=BD mm/dd/yyyy:
set /p email=Email:
echo USER >> docs/users.txt
echo ==== >> docs/users.txt
echo Username=%usern% >> docs/users.txt
echo Password=%passwd% >> docs/users.txt
echo BD=%bd% >> docs/users.txt
echo Email=%email% >> docs/users.txt
cls
echo Thank You.
echo.
echo Press any key to Login. . .
pause >nul
start login.bat
exit
login.cmd
::Copyright 2014 Krii.
@echo off
color f0
title Login
echo Please login to continue.
set /p usern=Username:
set /p passwd=Password:
=> => =>
if %usern%==%usern% in signup.cmd && %passwd%==%passwd% in signup.cmd goto authGood
goto authBad
=> => =>
login.cmd中第7行和第8行存在錯誤。 我不知道該怎麼辦。
請幫忙
謝謝。
什麼是錯誤? – aphoria
@aphoria「'in'不被識別爲內部或外部命令,可操作程序或批處理文件」。但它是一個命令。 – Krii
看看[this](http://stackoverflow.com/questions/664957/can-i-mask-an-input-text-in-a-bat-file/20343074#20343074)如果你想掩蓋密碼輸入。 – unclemeat