Question

I am a college student and need some help with this homework problem. I am taking...

I am a college student and need some help with this homework problem. I am taking an introductory Operating Scripting course (windows 10)

I need to create a batch file named UserInfolog.bat.  

Instead of displaying the output to the screen, redirect all output to a file named computername.log and it must be created each time the batch file is executed.  

After redirecting the output to the log file, the batch file must display that file's contents in the command prompt screen.  

The batch file must display information about a specific user account that exists on the computer. The output message must include the user's name, full name, the date the user's password was last set as well as the computer name and the current date and time.  

Thanks for your help.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Batch File Code(UserInfolog.bat.)

@ECHO OFF
ECHO batch file creation
break > computername.log
ECHO User Account Information.>>computername.log
ECHO ---------------------------------------- >> computername.log
net user >> computername.log
ECHO ---------------------------------------- >> computername.log
ECHO
ECHO User Details Information.>>computername.log
ECHO ---------------------------------------- >> computername.log
ECHO
net user %username% >> computername.log
ECHO ---------------------------------------- >> computername.log
ECHO Computer Name >>computername.log
ECHO
hostname >> computername.log
ECHO ---------------------------------------- >> computername.log
ECHO
ECHO System Date and time >>computername.log
ECHO ---------------------------------------- >> computername.log
echo %date% %time% >>computername.log
cls
type computername.log

Screen Shots

---------------------

Code Screen Shot

| Userlnfolog - Notepad File Edit Format View Help ФЕСНО ОFF ECHO batch file creation break > computername.log ECHO User Acco

Run output (computername.log)

-------------------------

D:\>type computername.log User Account Information. User accounts for \DESKTOP-G312485 Administrator Prakash Chandra Bhoi DefSystem Date and time 20-01-2020 23:47:23.60 D:\>


Add a comment
Know the answer?
Add Answer to:
I am a college student and need some help with this homework problem. I am taking...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need...

    I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with the batch file I am creating for a homework assisgnment.   I created the menu below and need some help with option A Please choose a task from the list below A) Add a new user account I need to use SET /P to prompt for a login name and if the user already exists display a message and return to the...

  • I am a college student taking an INTRODUCTORY Windows 10 operating system SCRIPTING course and need...

    I am a college student taking an INTRODUCTORY Windows 10 operating system SCRIPTING course and need some help with creating this batch script.   I need to create the below menu: Please choose a task from the list below A) Add a new user account I need to use the SET /P command to add a new user and prompt for a login name. Check if the user already exists and if so display an appropriate message and return to the...

  • I am taking an INTRODUCTORY Windows OS scripting course and could use your help in completing...

    I am taking an INTRODUCTORY Windows OS scripting course and could use your help in completing this homework assignment: I need to make sure that my batchfile directory is automatically included in the search path every time I open a command prompt window. My answer must be a step-by-step explanation (bulleted or numbered list) of the EXACT approach I took to complete this task. I must also provide an explanation of EXACTLY how I tested this to make sure it...

  • Windows operating system 1. Write a simple batch file named LastName Final.bat (where LastName is your...

    Windows operating system 1. Write a simple batch file named LastName Final.bat (where LastName is your own last name), which accomplishes the following: a Disable echo output b. Clear the screen c. Welcome the user with the following message (where current Date and curent Time is the computer's current date and current time, respectfully-these values should be output using a command line command, meaning do not type in the date or time into your batch file). A sample of this...

  • I am a college student taking an intro to linux shell programming course and need some...

    I am a college student taking an intro to linux shell programming course and need some help with this question. I need to write an until statement as indicated: Check to see if the file cis132 exists in the current directory. If it does not a message will be printed every 10 seconds indicating that file does not exist. Once the file is created the message will stop. Thanks for your help.

  • Hello, I am attempting to write a basic shell script using bash. It will need to...

    Hello, I am attempting to write a basic shell script using bash. It will need to print the user, host, time, and date. It will need to take user input for a txt file to be searched and create a new file to save the results. It must print the number of lines and characters in the text. The user will need to enter three words to be searched, and the number of occurrences of those words in the text...

  • I need help with my homework assignment Linux systems keep user account information in the passwd...

    I need help with my homework assignment Linux systems keep user account information in the passwd file and the encrypted password in the shadow file. The passwd file containing account information might look like this: smithj:x:1001:1001:John Smith:/home/smithj:/bin/bash The shadow file containing password and account expiration information for users might look like this: smithj:KJDKKkkLLjjwlnttqoiybnm.:10063:0:99999:7::: The fields in the shadow file are separated by a colon, with the first field being the username and the second being the password. Under normal circumstances,...

  • SQL injection problem I am studying web security and need to do a simple SQL injection...

    SQL injection problem I am studying web security and need to do a simple SQL injection to a self-built webpage. The webpage consists of a basic login page(username field and password field and a submit button). After submission of the data to a php file, it gives the result of authentication. .I need to bypass the authentication only knowing the ID is 'administrator'. The php file is like this: I tried inputting "admin';--" in the username field and password is...

  • Need help with writing a Windows PowerShell script that will perform the following functions: Sea...

    Need help with writing a Windows PowerShell script that will perform the following functions: Search your computer for files ending with a .doc, .docx, .xls, or .xlsx file extension. Output the filenames and sizes (in groups by file extension) to a text file named “File_Summary.txt”. The output should also conclude with a total of the number of files and total file size for each file extension. Include comments in the script code to document the functionality of the script. I...

  • I am in C++ programming, I need help with this assignments. The answer in this assignments...

    I am in C++ programming, I need help with this assignments. The answer in this assignments when I look for it it doesn't work in my visual studios. Can you please help me? I hardly have C in the class, if I fail I will fail the whole class and repeat this class again.   The file named Random.txt contains a long list of random numbers. Download the file to your system, then write a program that opens the file, reads...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT