Page 1 of 1 1
Topic Options
#134685 - 2005-02-28 03:46 AM USE problems
Skatterbrainz Offline
Starting to like KiXtart

Registered: 2002-10-17
Posts: 172
Loc: Virginia, USA
My login script maps drives just fine. However I've hit a problem I can't seem to solve with Kix alone. The problem came up when we had to map users to a new server where the shares were all replicated over beforehand, but the server name was obviously new. The problem was that the server team pulled the old server offline before the drives were remapped. When I try to use USE X: /DELETE it simply returns an error "Disconnect failure" or something like that. That prevents the next line from mapping to the new source. If I open a CMD window and type in NET USE X: /DELETE it drops it just fine. The drive can also be dropped via Explorer by using the "Disconnect" option. I've tried again and again with USE but it won't drop the mapping. Is this a bug in Windows or Kix or am I misunderstanding something? The only workaround I've found is to SHELL out and run "NET USE X: /DELETE", which seems like a silly way to do it (when USE should do it). Please advise?
_________________________
silence is golden, but duct tape is silver

Top
#134686 - 2005-02-28 03:51 AM Re: USE problems
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You should be able to use (no pun intended)
Code:

USE X: /DELETE /PERSISTENT


Alternatively, delete the corresponding registry key or use any of the MapDrive UDFs, which take care of server changes automatically. See for example MapDrive() - Maps a UNC name to a specific driveletter
_________________________
There are two types of vessels, submarines and targets.

Top
#134687 - 2005-02-28 03:52 AM Re: USE problems
Skatterbrainz Offline
Starting to like KiXtart

Registered: 2002-10-17
Posts: 172
Loc: Virginia, USA
I tried /PERSISTENT also (I should have mentioned that, sorry). I will try out the MapDrive() code however. Thanks!
_________________________
silence is golden, but duct tape is silver

Top
#134688 - 2005-02-28 04:28 AM Re: USE problems
Skatterbrainz Offline
Starting to like KiXtart

Registered: 2002-10-17
Posts: 172
Loc: Virginia, USA
That seems to work very well so far. I will continue testing it. Thank you!

Question (if I may): is there a function to iterate drive mappings and look for all that contain \\server1\share and remap them appropriately to \\server1\share (where 'share' names are identical)?

In other words, if X: is mapped to \\Server1\Files, I want X: to map to \\Server2\Files. I didn't see such a function while searching the UDF lib, but maybe I missed it.
_________________________
silence is golden, but duct tape is silver

Top
#134689 - 2005-02-28 05:04 AM Re: USE problems
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
fnMapped() - Uses FSO to determine if a UNC is mapped
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1257 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.06 seconds in which 0.03 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org