Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with modifying this batch file. Instead of
I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with modifying this batch file.
Instead of using conditional processing symbols to detect errors, use IF ERRORLEVEL.
DO NOT USE %ERRORLEVEL% It is not the same.
Thanks. (See below)
useradd.bat - Notepad File Edit Format View Help @ECHO off REM Batch File Name : useradd.bat :: Created by: Jake Dion :: The batch file must use the net user command :: to add a local user account to the computer. :: The user's login name and password must be :: passed to the batch file by the user at :: the time the batch file is executed. (parameters). Net user %1 2> nul > nul && goto error Net user %1 %2 /ADD 2> nul > nul || goto error Echo The %1 user was successfully added && goto end :error Echo An error was generated when attempting to create the user Echo These are things you can check: Echo Did you open the command prompt as administrator? Echo If passwords are required on your system, did you include on? endStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started