Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: gardenair
we are using windows server 2003 .I use a login script in GPO
User Configuration.....>Windows Settings......>Script.....>Login
In bat file i write the script with the following sysntex
NET USE Z: \\SERVER_NAME\Sahre Folder Name
On the client side when the user login through domain controller he/she can see Mapp drive automatically in My computer.
I want that when ever the user Logg off it automatically disconnect the mapp drive.Please guide me that how can i do that
thanks in advance for help.
garden

You have the option of a logoff script in the GPO as well. After that it's just down to compiling the script. Use this website to try and put your own script together:
http://www.computerperformance.co.u...
Look closer at this part:

Thanks for the reply. I want to know one more thing
-In windows server 2003 i made two partions.On C drive windows is installed and on D drive is free for mapping drive to keep the users their files in it.
NET USE x: \\SERVER_NAME\Sahre Folder Name /PERSISTENT:NO
NET USE y: \\SERVER_NAME\Sahre Folder Name /PERSISTENT:NO
NET USE z: \\SERVER_NAME\Sahre Folder Name /PERSISTENT:NO
In this case if the "Sahre Folder Name" is on C drive then it is fine on the client side but what if the "Sahre Folder Name" is on D drive? i.e the D drive (2nd partion is for users files.) Please where can i write the drive path in my NET USE command ? or there is no need to mention the path ?

Look into the Name Space Services of Windows 2003 Server. It provides the ability to make the share folder to be redundant on two different drives or even two different servers so that if one went down the users would never know because it will automatically switch over to the other drive.
Warning: Becareful with this if you are already using file replication between drives. I sorry to say, have done this where I setup name spaces on drives that already had File Replication Services setup then I turned on the replication services built into the Name Space service and it start a replication storm that emptied my entire share drive. Make sure you have a good tested backup before you start.

"Please where can i write the drive path in my NET USE command ? or there is no need to mention the path ?"
When you do a net use /? do you see any reference to path?
answer is no
Why would that be?
Again look at net use /?
It states only \\host name\share nameWhat your local "path" is is irrelevant to a share.
so \\server name\share1 can be on c:
and \\server name\share 2 can be on d: which means the network user would have no idea they were on different disks, different servers or even on a different NOS.

Well thanks again for the reply. I use GPO for net use. and under
“ User Configurations ----> Windows Settings----> Scripts (Login/Logoff) “ click on it.Under Login I write
Login script file “shared_drive.bat” with the following code
net use x: \\server-2.test.local\sales /persistent:no
net use y: \\server-2.test.local\marketing /persistent:no
net use z: \\server-2.test.local\accounts /persistent:no
Logoff script file “disconnect_drive.bat” with the followingnet use x: \\server-2.test.local\sales /delete
net use y: \\server-2.test.local\marketing /detele
net use z: \\server-2.test.local\accounts /deletI can see the map drives in my client computers.Please let me know any other script you think to add please must share with me
thanks in advance

Your code looks fine other than you are missing an "E" on your last delete command.
I think the problem is, we are not sure what you mean...
"I can see the map drives in my client computers.Please let me know any other script you think to add please must share with me"
Can you rewrite this a little because you should see the mapped drives if you login and it runs the login script which will re-map them.
From your other posts it looks like you are wanting to use Name Spaces...
http://www.windowsnetworking.com/ar...
What they will do for you is allow you to have a SHARE on both the C: and the D: drive. The files will replicate to each drive. From the clients point of view it appears as one virtual drive so that if one went down they would not know because it automatically switches.
I am not sure if this is what you are looking for. It looks like you are using a English translator and it is very hard to understand.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |