I'm on my school's Cyber Patriot team and I'm trying to make some batch scripts for the windows images. I can't get my code to work the way I'm trying to get it to work, what I'm trying to do is have it run, prompt the user for input, ask for input one more time, then either create a user account or delete one. Here is my code:
@ECHO off
xterm -e start
:start
echo 0a
echo Welcome to the Master Script For Windows CyberPatriot Completion
echo ----------------------------------------------------------------
echo What would you like to do first.
echo 1...User Add /w password pre-set (meets compexity requirements)
echo 2...User Delete (all files)
pause
set /P choice1= "Please make your choice: "
if %choice1% == 1 (
GOTO useradd
)
if %choice1% == 2 (
GOTO userdelete
)
:useradd
set /P choice2= "Please enter the name of the user you want to create (the password is pre-set
to Password123456789!): "
net user %choice2% Password123456789! /add
:userdelete
set /P choice2= "Please enter the name of the user you want to delete (WARNING! ALL FILES WILL
BE DELETED PLEASE CHECK FIRST): "
net user %choice2% /del
Also, if you have any batch resources, language recommendations, or suggestions as to what I should/shouldn't be doing please let me know. Thanks in advance for the help :)