Directory Object Picker

Jun 14, 2011 at 12:19 PM

I use this object to retrieve domain, username to use them for my service.

I receive information in form:

user@local.domain2.com

How I can get short name of domain, i.e.

 

user

mydomain

To user them then in installer as a

mydomain\user

Thanks.

Coordinator
Jun 23, 2011 at 12:35 AM

Use the GetUserNameFormatted CA, it takes parameters for the format that you want to get back. You want NameSamCompatible .

Jun 28, 2011 at 5:01 PM

Thank you!

One more question

How can I get ONLY domains? 

Coordinator
Jun 28, 2011 at 5:04 PM

I don't think I understand what you mean by "only domains".

Jun 28, 2011 at 5:14 PM

I have an Edit control where user must enter some Domain name. 

I.e. it is the same as Directory Object Picker provides  possibility to select user form some domain:

1) user selects domain form list

2) then selects or find users in this domain

In my case I need only domain names.

Jun 28, 2011 at 5:16 PM

I do this way, user can select computer names, but i need only domain names:

<Publish Property="DSOP_SCOPE_TYPES" Value="DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE|DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE|DSOP_SCOPE_TYPE_GLOBAL_CATALOG|DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN|DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN|DSOP_SCOPE_TYPE_WORKGROUP|DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN|DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN" Order="1">1</Publish>                   

<Publish Property="DSOP_SCOPE_FLAGS" Value="DSOP_SCOPE_FLAG_STARTING_SCOPE" Order="2">1</Publish>                    <Publish Property="DSOP_SCOPE_FILTER_FLAGS" Value="DSOP_FILTER_COMPUTERS" Order="3">1</Publish>                   

<Publish Property="DSOP_DOWNLEVEL_SCOPE_FILTER_FLAGS" Value="DSOP_DOWNLEVEL_FILTER_COMPUTERS" Order="4">1</Publish>

<Publish Event="DoAction" Value="DirectoryObjectPicker" Order="5">1</Publish>

Coordinator
Jun 28, 2011 at 11:30 PM

I don't know if it's possible. You should read the MSDN documentation for this thing, all the code does is expose it as a custom action.