Link to home
Create AccountLog in
Avatar of NTTldola
NTTldolaFlag for Australia

asked on

Request User Info in a batch file

Hello Experts,

I am currently working on a batch file for our company that will pull information such as the USERNAME and COMPUTERNAME, but will also allow the user that runs the file to input information such as their FIRST and LAST NAMES, and what FLOOR they are located on.

This is my script so far which pulls the automatic information

CLS
pause
echo %username% >> info.txt
echo %computername% >> info.txt
echo --------------------------------------------------------------- >> info.txt
CLS
echo Job complete
pause

As you can see this puts the information to a TXT file, which is fine. 500 points will go to whoever can give me a good batch file that builds on this one. I want it nice and neat so that the user can't see all the scripting when CMD runs.

Thanks guys,

-Lance
ASKER CERTIFIED SOLUTION
Avatar of Arkware
Arkware
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of NTTldola

ASKER

Perfect
(besides you had username and password, instead of First name and last name)

Full points awarded.
Oops - my bad with the typo.