How to find user group/memberof profile?
From: Robin M via .NET 247 (anonymous_at_dotnet247.com)
Date: 05/13/04
- Next message: vincent chow via .NET 247: "can't open tif file in IE for Windows 2003 server"
- Previous message: Susan Watters via .NET 247: "Retrieving value from bound text box"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 May 2004 21:58:21 -0700
I want to check if the user who is running the program has administrative right or not. I am using following code to check all the property names but I couldn't find "memberof" property ( as suggested in many forums/sites ).
I am using the following code. Is there any other way to check if the logged user belongs to Administrator group or not. I am using Win 2000 platform.
Dim ADRootDSE As System.DirectoryServices.DirectoryEntry = New System.DirectoryServices.DirectoryEntry()
ADRootDSE.Path = "WinNT://domainservername"
ADRootDSE.Username = "robin"
ADRootDSE.Password = "abc"
Dim propName As String
Dim value As String
Dim obj As Object
For Each propName In ADRootDSE.Properties.PropertyNames
Console.WriteLine("name= " & propName)
obj = ADRootDSE.Properties(propName).Value
value = CType(obj, String)
Next propName
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>Ck+0AO2Fsk2uQJMIY+1QwQ==</Id>
- Next message: vincent chow via .NET 247: "can't open tif file in IE for Windows 2003 server"
- Previous message: Susan Watters via .NET 247: "Retrieving value from bound text box"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|