Jump to content

Batch Files


luke.mccormick

Recommended Posts

Hey guys, doing some batch file stuff for homework. I forget how to get input from a user and set it as a cmd variable

here's what my instructions are:

Create a batch file that will ask the user, after the batch file is executed, to input a first name, last name, and a username for that user. Your job is to add that person ads a local user. You will also need to create a home directory for them in D:\home\username and share the directory. In addition, you will need to set their password to 12345678 and add them to a local group called "testgroup" (which you need to create in this batch file). They should only be allowed access from 6 AM to 10 PM on Monday thru Friday and their full name should be added appropriately also.

Basically, my main question at the moment is how to get the user input after the batch file is executed(meaning i can't do this)

batchfile.bat Firstname Lastname username Password.....

and use %1, %2 and so on...

so im asking how to get user input after batch file has been executed.

thanks in advance

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...