{"id":8400,"date":"2021-11-28T10:54:04","date_gmt":"2021-11-28T10:54:04","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=8400"},"modified":"2021-11-28T10:54:56","modified_gmt":"2021-11-28T10:54:56","slug":"batch-file-login-script","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-login-script\/28448.html","title":{"rendered":"Batch File Login Script"},"content":{"rendered":"<p>So I am trying to make a log in system for my batch files. I have it to where it creates the text document and puts the info in it, I just don&#8217;t know how do make it so if you type in an unregistered name (name in the text file) or password wrong, it will tell you. Here is my script if think you can help me.<\/p>\n<p>@echo off<br \/>\ntitle login<br \/>\ncolor 0b<br \/>\n:menu<br \/>\ncls<br \/>\necho 1.Sign in<br \/>\necho 2.Register<br \/>\necho 4.Exit<br \/>\necho.<br \/>\nset \/p input=What would you like to do:<br \/>\nif %input%==1 goto log<br \/>\nif %input%==2 goto reg<br \/>\nif %input%==3 goto exit<br \/>\ngoto error<\/p>\n<p>:reg<br \/>\ncls<br \/>\ncolor 0e<br \/>\nset \/p user=Enter your desired username:<br \/>\nset \/p pass=Enter your desired password:<br \/>\necho %user% &gt;&gt; username.txt<br \/>\necho %pass% &gt;&gt; password.txt<\/p>\n<p>:log<br \/>\nif exist username.txt goto menu2<br \/>\nif not exist password.txt goto reg<br \/>\ngoto error<\/p>\n<p>:menu2<br \/>\ncls<br \/>\ncolor 0b<br \/>\necho WELCOME!<br \/>\necho.<br \/>\necho 1.Sign in<br \/>\necho 2.Options<br \/>\necho 3.Exit<br \/>\necho.<br \/>\nset \/p input=What would you like to do?<br \/>\nif %input%==1 goto log2<br \/>\nif %input%==2 goto op<br \/>\nif %input%==3 goto exit<br \/>\ngoto error<\/p>\n<p>:exit<br \/>\nexit<\/p>\n<p>:log2<br \/>\ncls<br \/>\ncolor 0b<br \/>\nset \/p input=Username:<br \/>\nif exist goto pass2<br \/>\ngoto error<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":30},"question-category":[55],"question_tags":[],"class_list":["post-8400","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/8400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=8400"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=8400"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=8400"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=8400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}