Set user?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Disruptis
Posts: 1
Joined: 04 Jun 2015 10:25

Set user?

#1 Post by Disruptis » 04 Jun 2015 10:34

I'm a noob, partially my reason for coming here, and the fact that tutorials were too hard to read through, but I have a question.

I am trying to make a login screen in a game (completely made with MS-DOS) and I was wondering if you could use the set command and the if statement to make a conditional statement depending whether or not said variable is there.

EX.

:Loginsuccess
SET variable to userguest
goto terminal

:terminal
set /p choice= ]
if '%choice%'=='open file.txt' goto test1

:test1
if variable is userguest goto goodlogin
if variable is not userguest goto badlogin

:badlogin
echo You are not logged in!

Post Reply