-2

I created a shared folder on my NAS box that has a folder for each user in it and it mimics their user name. I'm looking to write a .bat that will map the user folders inside to each user by user name. So when they log in they have their folder in the drive area mapped.

not looking to dot he Home group folder path in ADUC because it causes issues with users that have laptops.

Thanks!!

1 Answer 1

2

The %USERNAME% environment variable is set individually for every logged in user. So in your batch file, you can do:

net use * \\\\server\share\%USERNAME%

This will map the user's named folder to the next available drive letter (assuming they have permissions to the share).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .