Page 1 of 1 1
Topic Options
#668 - 1999-10-13 05:35 AM KiXtart cannot delete 'unavailable' drive mapping
Anonymous
Unregistered


I cannot seem to delete a permanent drive mapping in KiXtart. It seems to be because the offending mapping points to a share that no longer exists and KiXtart cannot detect it.

A KiXtart USE /LIST doesn't show the mapping, but a command line NET USE shows it as being 'unavailable'.

If I try and delete the permananent mapping using KiXtart it doesn't delete it. If I delete it from the command line using NET USE S: /DELETE it does get deleted.

Is there any way KiXtart can detect that this mapping is unavailable and let me delete it?

Thanks

Matt

Top
#669 - 1999-10-13 08:15 AM Re: KiXtart cannot delete 'unavailable' drive mapping
Anonymous
Unregistered


Hi Matt,

How are you trying to delete it? What system is this on? Have you enumerated the persistent connections and seen if it is listed in there? In case you haven't, here is a piece of code I use for my clients to list the persistent connections, or delete them.

code:

;****************************************************************************************
:ENUMPERSIST
; Description:
; Enumerate all the user's persistent connections. Want to keep it in a log
; in case the user has a problem.
;
; Input:
; $OS, $HKCU, $HKU, $user
;
; Output:
; None
;****************************************************************************************
; Modification History
; Date Initials Description
; 11 Aug 99 bvv Wrote first cut.
;****************************************************************************************
;
Dim $index, $persist, $loop_index, $name, $keyname, $p_name, $returncode
$index=0
If $OS="Win9x"
$persist="$HKCU\Network\Persistent"
Else
$persist="$HKCU\Network"
Endif
? "Enumerate the persistent connections: "+$persist
$loop_index=0
While $loop_index=0
$name=EnumKey("$persist",$index)
$loop_index=@ERROR
If $loop_index=0
$keyname=$persist+"\"+$name
$p_name=ReadValue("$keyname","RemotePath")
? "The enumerated value is: "+$name+" and its UNC is: "+$p_name+"."
; If you want to delete the keys, uncomment the next few lines.
; $returncode=DelKey($keyname)
; If $returncode=0
; ? "The persistent connection to "+$p_name+" was deleted."
; ? "The index value is: "+$loop_index+"."
; Else
; ? "There was a problem deleting the persistent connection to: "+$p_name
; Endif
$index=$index+1
Else
If $loop_index=259
; This error should come up when all entries have been enumerated.
? "All persistent connections have been listed."
Else
; An unknown error has occurred.
? "An error has occurred while enumerating persistent connections. The"
? "error number is: "+$loop_index+"."
Endif
Endif
Loop
Return
;

------------------
Regards,

Brad
Consultant
Net InfraStructure, Inc

Top
#670 - 1999-10-13 08:19 AM Re: KiXtart cannot delete 'unavailable' drive mapping
Anonymous
Unregistered


Oops, forgot there were a couple of variables defined elsewhere. They are:

$OS="Win9x" or "Windows NT"
$HKCU="HKEY_CURRENT_USER"
$user=@USERID

------------------
Regards,

Brad
Consultant
Net InfraStructure, Inc

Top
#671 - 1999-10-13 11:01 AM Re: KiXtart cannot delete 'unavailable' drive mapping
Anonymous
Unregistered


Great - thanks for that tip. I tried it out and it does just what I needed for persistent connections.

I'll hunt down a PC that has a persistent connection to an 'unavailable' drive and give it a go!

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 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.084 seconds in which 0.07 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