Go to ...

Techpository

A Better Technical Repository

RSS Feed

Windows: Create a batch file that logs users into their home directory on demand


The following batch script can be used to log on users to their home directory on demand.  This can be good for businesses that use Kiosk’s with generic logons, but still need to give users access to their home drives.

@echo off
set /p userid=”Enter your username: ”
C:\Windows\System32\runas.exe /user:riverview\%userid% “explorer.exe \”\\fiiservers1\Home\%userid%””