I am trying to create a small app using visual studio 2005 (vb), and I want
to be able to input the users name and add the domain user to the local
remote desktop user group. Here is the code I have so far.
Dim LCL As New DirectoryEntry
Dim DOM As New DirectoryEntry
Dim DOMUSR As DirectoryEntry
Dim LCLGRP As DirectoryEntry
LCL = "WinNT://" & "PCNAME" & ",computer"
DOM = "WinNT://domain"
DOMUSR = DOM.Children.Find("USERID", "user")
LCLGRP = LCL.Children.Find("LOCAL_GROUP", "group")
LCLGRP.Invoke("Add", New Object() {DOMUSR.Path.ToString})
when I debug this I get the follow error on all four dim statements
Error 1 Type 'DirectoryEntry' is not defined.