Groups | Blog | Home
all groups > dotnet interop > january 2005 >

dotnet interop : Delete a Computer Account from


S Garratt
1/28/2005 4:21:03 AM
I can use DirectoryEntry.DeleteTree() to delete a Computer Account but when
there's a problem, the error message always seems to be "Unspecified Error".
I need to know whether I've got user credentials problems or non-existant
objects. Reading around the problem, it seems that the implementation isn't
very good and that you can get directly to ADSI using DirectoryEntry.Invoke
but I can't figure out the syntax.

Two questions:
1. Does anyone know the syntax for deleting an account using .Invoke

2. Will it give me a better error code. I've seen other pages showing
..Invoke which have returned ADSI-style 8007nnnn error codes but not for
Jared Parsons [MSFT]
1/28/2005 4:24:12 PM
What's the error code id in the "Unspecified error" exception?

--
Jared Parsons [MSFT]
jaredpar@online.microsoft.com
"This posting is provided "AS IS" with no warranties, and confers no rights"
[quoted text, click to view]

S Garratt
1/31/2005 3:13:02 AM
There isn't one: that's the problem! I just get:

Additional information: Unspecified error.

Hence me wondering if using .Invoke would be better.

SG

[quoted text, click to view]
AddThis Social Bookmark Button