Link to home
Start Free TrialLog in
Avatar of vmamedov
vmamedov

asked on

Script to map home drive for users

Currenly I mapping a users "h" home drive with an entry in the users properties under the home folder path. I would like to script so that when users log in they are mapped to their h drive on a server.

Each user has a shared with with the correct permissions on the server. The share is username$
So in the home folder properties its \\server\username$

Thanks in advance
Avatar of vmamedov
vmamedov

ASKER

I would also like to use DFS, so the location of the home drive would be \\domain\share\share\username$
Hi,

As i understand correctly, you do NOT wish to use the AD integrated homefolder option en want to script it ?

How about this in the loginscript:

Net use H: \\domain\share\share\%username%$

Where you use the environment variable %username%

If I do not understand correctly please say so :p

M
I have tried that and it doesnt work, it doesnt map the drive,
also i am looking for a vb script not batch
ASKER CERTIFIED SOLUTION
Avatar of chandru_sol
chandru_sol
Flag of India 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
arg C beat me again. /sigh
chandru, thanks for your help
after running the script i am getting the following error

---------------------------
Windows Script Host
---------------------------
Script:      C:\Documents and Settings\user\Desktop\hdrives.vbs
Line:      11
Char:      1
Error:      The system cannot find the file specified.

Code:      80070002
Source:       WSHNetwork.MapNetworkDrive

---------------------------
OK  
---------------------------
i figured out what i was doing, there was a problem with DFS

thanks both
How did you fix the issue? I am getting same error when I run the script.
adrian whats is the problem that you are having?