piotrb
(Fresh Scripter)
2005-06-02 03:41 PM
USE * /DELETE problem

Hello!
I want to clean ANY drive mappings starting logon script.
(client XP prof, server NT 4.0, KIX ver. 4.23) I use:
Code:
use * /delete /persistent


When I list current mappings (USE LIST) I see "No entries in list",
but When I try to map drive I get error 1202 (??), and in My computer still are old mappings.
I carefully read the manual:
USE <* | "device" | "resource"> /DELETE [/PERSISTENT]
IMO my command schould be OK.
Thanks for answer


Les
(KiX Master)
2005-06-02 04:36 PM
Re: USE * /DELETE problem

In the KiX manual, 1202 lists as "ERROR_DEVICE_ALREADY_REMEMBERED". I suspect that there is a persistent mapping done outside of KiX either at the workstation or through the user's profile settings.

LonkeroAdministrator
(KiX Master Guru)
2005-06-02 06:15 PM
Re: USE * /DELETE problem

hmm...
this actually seems that there is something worth investigating.
if I read right, he does look after issuing the use del, thus, no remembering for that user should be applied, thus there is an issue.

now, is that issue of windows or kix or how they work together, is another question.
but there is clearly an issue.


NTDOCAdministrator
(KiX Master)
2005-06-02 08:59 PM
Re: USE * /DELETE problem

I agree that something is up with the /PERSISTENT switch either in KiX or from outside mapping.

I was unable to have KiXtart unmap the drives that were set to be persistent.

Code:
USE "*" /DELETE /PERSISTENT
? 'ER1: ' + @ERROR
USE LIST
USE * /DELETE /PERSISTENT
? 'ER2: ' + @ERROR
USE LIST
USE "*" /DELETE
? 'ER3: ' + @ERROR
USE LIST
USE * /DELETE
? 'ER4: ' + @ERROR
USE LIST



Code:
ER1: 0
Current redirections :

No entries in list.

ER2: 0
Current redirections :

No entries in list.

ER3: 0
Current redirections :

No entries in list.

ER4: 0
Current redirections :

No entries in list.



Even thought it said there were no drives in the LIST the drives were still there and I could access the remote shares still.
 

One I removed the drive mappings and did not use the /PERSISTENT switch then KiX was able to unmap the drives.

I tested with KiX 4.23 and 2010 4.50 Release Candidate 1
both gave the same results.

At this point I have no method except to run maybe my own EnumNetworkDrives UDF and then for each one found SHELL out and have NET USE delete the connections.

Not really sure what's up, but KiX currently does not appear to be robust with the connection removal.
 


piotrb
(Fresh Scripter)
2005-06-03 09:47 AM
Re: USE * /DELETE problem

I make small investigation.
Client computer: orginal IBM PC with IBM preinstalled Win XP (Polish) SP2.
only MS TCP/IP stack, DHCP client, firewall disabled.
small network (100 PC), PDC and BDC with NT 4.0 SP6. No problems with network.
My job is to centralize logon process. Now users have "self made" mappings and no logon script, I working on one centralized logon script for all.
At the beginning I want to delete all old mappings (I want to do this with KiX) and have problem.
1. Kix-maked mappings are deletable
(use * /delete /persistent from KiX or net use * /delete from command line)
2. NET USE-maked mappings are deletable too
3. Mappings maked from "My computer\map network drive\" (with reconnect at logon enabled) are deletable from command line (there is nothing on the list when I type "NET USE"), but in "My computer" I still see network drive icons.
When I click on them I see:"X: goes to the not avaliable localization..." (sorry for translaton).
When I want to unmap this drive with "disconnect" I see "It is not possible to find network connection".

I think that KiX may have problem because Win XP have problem with diconnect.

IMO this is similar with Windows 9x behavior:
Code:
CASE @INWIN = ("2")
use * /delete
if DELKEY("HKCU\Network\Persistent") <> 0 ? "error "+@error endif


Thanks for answers.


LonkeroAdministrator
(KiX Master Guru)
2005-06-03 02:47 PM
Re: USE * /DELETE problem

this might be the same thing introduced in w2k already with the auto disconnecting drives.

Les
(KiX Master)
2005-06-03 02:53 PM
Re: USE * /DELETE problem

In Win9x, the solution was to delete them out of the registry.

Sealeopard
(KiX Master)
2005-06-04 02:52 PM
Re: USE * /DELETE problem

IIRC, one of the MapDrive() UDFs can delete all drives and makes sure that the appropriate registry entries are being removed as well.

NTDOCAdministrator
(KiX Master)
2005-06-04 09:13 PM
Re: USE * /DELETE problem

Well in my testing using any of the Map UDF (without shelling to NET USE) was unable to remove the drive mapping.

I still say that there are situations where KiXtart can not remove the drive mapping, but NET USE can. So to me I think KiX needs to be reviewed by Ruud to determine what is being done differently in NET USE then his code.

i.e. Maybe KiX needs a FORCE switch or something.
 


LonkeroAdministrator
(KiX Master Guru)
2005-06-05 12:34 PM
Re: USE * /DELETE problem

ja, that seems to be the correct conclusion and I support bringing this to ruud.

Schuliebug
(Hey THIS is FUN)
2005-09-18 09:37 PM
Re: USE * /DELETE problem

Did Ruud already had a chance to look into this issue or is there another solution (not being shell '%ComSpec% /c net use * /delete') ?

We stumbled into this problem this weekend, thinking our centralized login script was handling this fine... NOT. We replaced use * /delete with the Shell command and everything workes fine till now


LonkeroAdministrator
(KiX Master Guru)
2005-09-19 01:16 AM
Re: USE * /DELETE problem

well, see in beta forum.
if this was not posted in there, it most likely wasn't catched by ruud


TechFan
(Lurker)
2006-04-18 01:45 AM
Re: USE * /DELETE problem

I don't see this on the beta forum. So, it must still be an issue. Do I need special access to post on the beta. We just are running into issues of drives not being deleted/remapped properly with use - works with "net use"

scott_s
(Fresh Scripter)
2006-06-01 05:15 PM
Re: USE * /DELETE problem

I am having the same problem USE g: /del does not work if it is a persistant connection. Has there been any updates on this?

JochenAdministrator
(KiX Supporter)
2006-06-01 05:21 PM
Re: USE * /DELETE problem

Can we have a moderator of starters forum move this thread to Beta, please ?

Les
(KiX Master)
2006-06-01 07:33 PM
Re: USE * /DELETE problem

Why was this moved to beta?
IMHO, using the command without the /persistent switch is not expected to delete persistent connections.


NTDOCAdministrator
(KiX Master)
2006-06-01 07:43 PM
Re: USE * /DELETE problem

Don't know who moved the post.

I agree Les, however I have used it in that fashion and still had KiX not remove the mapping.

I don't care where the post resides, but there IS SOMETHING WRONG with how KiX is unmapping the drives.

Doing everything possible in KiX there have been times when a drive would not unmap, but running NET USE did work, so something is not up to snuff.
 


Howard Bullock
(KiX Supporter)
2006-06-01 08:14 PM
Re: USE * /DELETE problem

I moved it, based on a request...

JochenAdministrator
(KiX Supporter)
2006-06-01 08:43 PM
Re: USE * /DELETE problem

If you read carefully, the problem occurs allthough the /persistent switch is used, so the move is legitimated.

LonkeroAdministrator
(KiX Master Guru)
2006-06-01 08:54 PM
Re: USE * /DELETE problem

wonder if the drive is marked as "disconnected" when viewed with net use on the commandline when kixtart fails to unmap it...

NTDOCAdministrator
(KiX Master)
2006-06-01 09:37 PM
Re: USE * /DELETE problem

In my case no it was not.

Currently not seeing the issue anywhere though.

Difficult to analyze unless you have the issue happening.


JochenAdministrator
(KiX Supporter)
2006-06-02 09:04 AM
Re: USE * /DELETE problem

Ok,

I can verify that with w2k and the latest kixtart version there is no problem removing persistent mappings when fully logged in
There may be a problem at logon because HKCU isn't fully loaded and the persistent maps are recovered from HKCU\Network\[Driveletter] ... But tbh, I won't test that atm

Now back to remap my several persistent connections


NTDOCAdministrator
(KiX Master)
2006-06-02 09:38 AM
Re: USE * /DELETE problem

In general there isn't Jochen. It's more of an inconsistant issue that on occasion pops up.

That's why I say that unless you're having this problem you can't seem to duplicate it at will. The issue has to already be there to show/confirm KiX doesn't work and NET USE does.

I've been there, I've seen it and I now have many years of KiXtart and Networking experience to say that "something" is not the same with how KiXtart is doing it and how NET USE is doing it.

Have never personally had NET USE not work, but have had KiXtart not work.

There is no way that I know of to duplicate the problem, you have it or you don't. If someone that is having the problem knows of a way to 100% duplicate it please speak up as I don't know how to do it.


Björn
(Korg Regular)
2006-07-24 02:24 PM
Re: USE * /DELETE problem

Has this issue been resolved in the latest release? (4.52)

Les
(KiX Master)
2006-07-24 02:29 PM
Re: USE * /DELETE problem

This topic is in Starters. If you want Ruud's attention, find and bump where it was raised in Beta or Suggestions, and if it wasn't raised there, don't expect Ruud to act on it.

Björn
(Korg Regular)
2006-07-24 02:31 PM
Re: USE * /DELETE problem

I'm getting the feeling that you're stalking me!
Doc posted in beta/suggestions and refered to this thread.
I'll head over to Doc's thread then, see ya there Les? =)


Les
(KiX Master)
2006-07-24 03:40 PM
Re: USE * /DELETE problem



Ruud van Velsen
(Hey THIS is FUN)
2006-07-27 04:13 PM
Re: USE * /DELETE problem

Done some mor research on this. In short, "USE * /delete (with or without /persistent)" does not delete persistent connections.

I will fix this in 4.53.

Thanks for all your input on this. I'm sorry it took so long to find the cause of the problem.

Regards,

Ruud


Björn
(Korg Regular)
2006-07-28 09:20 AM
Re: USE * /DELETE problem

Thanks for the input Ruud, hope that this can be easily resolved.

Jim_O
(Just in Town)
2012-01-31 06:21 PM
Re: USE * /DELETE problem

So I'm having this issue. Mapped drives created with an older version of KiX are not being removed from the 2010.462 version of KiX. I'm trying the:

USE G: /DELETE

And the drive is showing as 'Disconnected' in My Computer. Should I be doing:

USE G: /DELETE /PERSISTENT


AllenAdministrator
(KiX Supporter)
2012-01-31 06:26 PM
Re: USE * /DELETE problem

If they were mapped with persistent then you will have to remove them with persistent.

Although your comments apply to this thread, it is over 6 years old. Please start a new thread.


Mart
(KiX Supporter)
2012-01-31 11:54 PM
Re: USE * /DELETE problem

Please do not dig up a 5 and a half year old post. Creating your own thread and linking to this one would be better.

It never hurts to always use the /persistent parameter. This way you are always sure the drive is removed even it is not mapped persistent.