Computing.Net > Forums > Windows Server 2003 > Logoff Script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Logoff Script

Reply to Message Icon

Name: gardenair
Date: October 14, 2009 at 22:44:39 Pacific
OS: Windows Vista
CPU/Ram: 2GB
Product: Dell / DELL
Subcategory: Configurations
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Phatsta
Date: October 15, 2009 at 06:49:39 Pacific
Reply:

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:

http://www.computerperformance.co.u...


0

Response Number 2
Name: ace_omega
Date: October 15, 2009 at 11:02:08 Pacific
Reply:

Just use MAP DELETE in place of MAP USE.


0

Response Number 3
Name: gardenair
Date: October 16, 2009 at 23:44:09 Pacific
Reply:

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 ?


0

Response Number 4
Name: ace_omega
Date: October 19, 2009 at 09:47:06 Pacific
Reply:

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.


0

Response Number 5
Name: wanderer
Date: October 19, 2009 at 09:57:03 Pacific
Reply:

"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 name

What 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.


0

Related Posts

See More



Response Number 6
Name: gardenair
Date: October 20, 2009 at 20:22:59 Pacific
Reply:

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 following

net 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 /delet

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

thanks in advance


0

Response Number 7
Name: ace_omega
Date: October 22, 2009 at 08:10:28 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Logoff Script

Logoff script - Group Policy www.computing.net/answers/windows-2003/logoff-script-group-policy/6396.html

removing IE proxy with script www.computing.net/answers/windows-2003/removing-ie-proxy-with-script/6437.html

Terminal Services shutdown script. www.computing.net/answers/windows-2003/terminal-services-shutdown-script/3978.html