Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Copy/Paste your script from step 2b here. In Notepad, select File rightarrow New to start a new file. Enter the following instructions. Save the file
Copy/Paste your script from step 2b here.
In Notepad, select File rightarrow New to start a new file. Enter the following instructions. Save the file as startup.bat. echo System Report Follows: ver echo Date and Time: date/T time/T hostname set NAME=your full name echo Establishing new environment variable Name = %NAME% ipconfig path The/T after date and time force these two instructions to output the date and time without prompting the user to see if either should be changed. Use your first and last name in the set Name instruction with a space between them. Run your script. You will notice that the set output there is too much text to fit on one screen, so you have to scroll up to read the full output. Notice as the program runs, each instruction is output and then the results are output. We do not want to see the actual instructions. To "hide" them, add as the first instruction in this script @echo off. Save the file and rerun it. Look at the output. What does ver do? What does hostname do? What does path do? b. With echo off, we do not see the actual instructions as they execute, only their output. And yet it would be helpful to know something about what we are seeing such as "Your PATH variable is currently storing:" before we see the output to path. Add echo statements to precede the hostname and path instructions. Save and rerun your script. Another instruction worth using is cls, which clears the screen. Add this instruction immediately after doesn't run your script. Another useful instruction pause, which pauses the output so that it doesn't scroll off the screen. Insert a pause instruction at an appropriate place in your script. Save and run your script. When you have satisfactorily fixed your script as described in this step, save your revised script to your answer file in response to this step. c. Start a new notepad file and enter the following. Add two blanks after the number in both set instructions. @echo off set/p x = Enter a number set/p y = Enter a second number if %x% gtr %y% (echo %x% is greater than %y%) else (echo %y% is greater than or equal to %x%)
Step 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