|
|
|||||||
How do I delete drive mappings created by netlogon scipt as kix does not seem to be able to delete those drive mappings (kix can delete its own created drive mappings) using “USE p: /DELETE” (in this case p: was created previously using a batch file in the netlogon Help is appreciated. |
||||||||
|
|
|||||||
if there are files in use on the share, it will be hard to close the connection. also, if the drive was mapped persistent it will come back at next logon, unless you add /persistent to the "use p: /delete /persistent" |
||||||||
|
|
|||||||
Scenario, I have been using a "logon.bat" in my netlogon up to now. this created all my drives for me fine. With KIX I am trying to reconnect those drives, but found that I had to first disconnect all drives created by my logon.bat before KIX will re-create those drives. I have 1200 workstation and just cannot see how I am going to disconnect those drives. Thanks |
||||||||
|
|
|||||||
"use p: /delete /persistent" or "use * /delete /persistent" to delete them all |
||||||||
|
|
|||||||
does not work - will only delte those drives created by KIX |
||||||||
|
|
|||||||
what is the error? yes, the @error |
||||||||
|
|
|||||||
Quote: I have to disagree. Perhaps does not work for you for unknown reasons. The wildcard delete however is a bit version dependent due to a prior bug. |
||||||||
|
|
|||||||
I recommend delting the explicit drive just before you attempt to remap it. An example is shown below. If this still fails then you will need to check @error @serror just after the stement: USE $Drive /Delete /Persistent Be aware that my UDF call other UDF code that you may not have in your script. Code: Function MapDrive($Drive, $Server, $Share) |
||||||||
|
|
|||||||
Ok Here is what is happening: WindowsXP SP2 workstation - Server 2003 SP1 I map my p: drive using DOS (net use p: \\server\share) - this maps my p drive for this test now I run KIX: A) USE p: /DELETE /PERSIST -- no error from @ERROR looking at the windows xp explorer my P drive now changes to a "disconnected network drive" type B) next in the script: USE p: "\\server\share" /persistent -- error: "Connection to another network resource" My old p mapping is still in a "disconnected network drive" state but when i cklick on the drive letter my old drive maps back. If i use DOS and manually do above using: net use p:/ d net use p: \\server\share everything works fine |
||||||||
|
|
|||||||
Please run this and post the returned information. Code: Break On |
||||||||
|
|
|||||||
Is this "/PERSIST" a valid switch for USE? That was not in my example. |
||||||||
|
|
|||||||
OK - what happened was is that one server (server1) hosting the share "sharename" broke. \\server1\sharename so I moved the share to a second server (server2) with the same sharename. so now I have: \\server2\sharename and thats were kix stopped working. I now re-created server1 and moved the share back to server1 (from server2) and EVERYTHING is working fine !?!?!? Again, it seems that WindowsXP keeps a record of the share, and stopps kix from mapping the same share name to a different servernae - does this make any sense? |
||||||||
|
|
|||||||
Quote: I am experiencing this very same behaviour since our Workstations started to run under XP. Under Win NT 4 and Win 2K my Kix-Login-Script, which is still the same, deleted the mapping before remapping it. Starting with XP, if the user maps something on a letter, say X:, the kix statement USE X: /DELETE can not free up the letter X: The user has to disconnect the drive first manually in the windows-explorer. Only after that, the letter can be used by kix at next logon. I did not try the suggested option /Delete /Persistent yet. Ok, now I made another series of tests and the suggested Option does the trick. So use Code: USE X: /DELETE /PERSISTENT to be sure that persistently mapped drives by the user are also disconnected and available for a new mapping. |