Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 03-14-2009, 09:54 PM   #1
Beta Member
burn2destroy's Avatar
Join Date: Mar 2009
Posts: 4
Default Command Prompt Help

Well, I think I got this script right for my OS, its to make a new user or login.

@echo off
echo Have you got an account? (Y/N)
set /p yn=
IF %yn% == N GOTO 1
IF %yn% == n GOTO 1
IF %yn% == Y GOTO 2
IF %yn% == y GOTO 2

echo Please type your new account name.

set /p username=
md %username%
echo loading
ping localhose -n 2 > nul
echo loading.
ping localhose -n 2 > nul
echo loading..
ping localhose -n 2 > nul
echo loading…
ping localhose -n 2 > nul
echo Enjoy!
PAUSE > nul
goto start

set /p login=Username:
if not exist %login% goto start
:logged in
echo You are logged in.
PAUSE > nul
Does it look right?

burn2destroy is offline   Reply With Quote
Old 03-15-2009, 12:34 AM   #2
Fully Optimized
Š88's Avatar
Join Date: May 2005
Posts: 4,775
Send a message via MSN to Š88
Default Re: Command Prompt Help

it's been ages since i've done any shell scripting so i can't comment on whether it's correct or not but one thing I noticed immediately is that there is no handle for improper user inputs
Killing under the cloak of war is no different than murder

Kein Alkohol ist auch keine Lösung!
Š88 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 08:28 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0