Link to home
Start Free TrialLog in
Avatar of vneedhelp
vneedhelp

asked on

VB script to map a network drive with logged in user name

Hi,

I have windows 2008 file server with shared users folders. I want to run a VB script in GPO so that for each user it should select appropriate user folder from file server and the mapped network drive should display the name of the user. for eg [X:John]

Any help is appriciated.

thanks
Avatar of mnation1
mnation1

I'm sure there's a way in VB, but it should also work with a DOS batch file.

Copy what's below into a text file and rename with a .bat file extension.

@echo off
net use x: \\[servername]\%username%

This is assuming you have a folder named the same as the username that is shared on the file server.

good luck!
SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Argh, I should have typed it quicker.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial