Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logoff script?????

Status
Not open for further replies.

Ger2111

IS-IT--Management
Jan 16, 2003
178
GB
Folks,
I can successfully map a drive to an AS400 in a W2K domain using a logon script.
The problem I am having is that my pc's try to reconnect to the drive before the logon script runs on start up and they are prompted for a password. What I need to be able to do is to disconnect the mapped drive on logoff or system shutdown.
Can I use a log off script ? if so how do i set this up, I can use task scheduler but I do not want to have to set this up on each users PC.
Any thoughts???

MCP
 
try adding /persistent:no to the end of your net use statement and see if it works...

net use \\servername\sharedfolder /persistent:no

You may have to delete each mapping first:
net use \\servername\sharefolder /delete

~ K.I.S.S - Don't make it any more complex than it has to be ~
 
You could use Group policies on the server.
There you can add both logon and logoff scripts.
So make a BAT file with
net use \\servername\sharefolder /delete
in it and add to your logoff script in the Group Policy.

A tip for making spectacular logon scripts is KIX
I believe you could do anything with that.

// I
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top