Connecting Tech Pros Worldwide Forums | Help | Site Map

How to get Domain Name from service?

Joe
Guest
 
Posts: n/a
#1: Nov 21 '05
I would like to obtain the machine's domain name from my service application,
but the Environment.UserDomainName property only returns "NT AUTHORITY". Is
there an easy way to get the information I'm looking for without resorting to
WMI?

Thanks!

Ken Tucker [MVP]
Guest
 
Posts: n/a
#2: Nov 21 '05

re: How to get Domain Name from service?


Hi,

Did you try systeminformation.userdomainname?

http://msdn.microsoft.com/library/de...nnametopic.asp

Ken
-----------------------
"Joe" <Joe@discussions.microsoft.com> wrote in message
news:BBE5D49C-59E6-406C-B2CC-22D9C98AC69F@microsoft.com...
I would like to obtain the machine's domain name from my service
application,
but the Environment.UserDomainName property only returns "NT AUTHORITY". Is
there an easy way to get the information I'm looking for without resorting
to
WMI?

Thanks!


Joe
Guest
 
Posts: n/a
#3: Nov 21 '05

re: How to get Domain Name from service?


Ken,

That function only returns "NT AUTHORITY" as well when called from a
service. Do you know of any other functions that would provide the machine's
domain name?

Thanks.

Joe

"Ken Tucker [MVP]" wrote:
[color=blue]
> Hi,
>
> Did you try systeminformation.userdomainname?
>
> http://msdn.microsoft.com/library/de...nnametopic.asp
>
> Ken
> -----------------------
> "Joe" <Joe@discussions.microsoft.com> wrote in message
> news:BBE5D49C-59E6-406C-B2CC-22D9C98AC69F@microsoft.com...
> I would like to obtain the machine's domain name from my service
> application,
> but the Environment.UserDomainName property only returns "NT AUTHORITY". Is
> there an easy way to get the information I'm looking for without resorting
> to
> WMI?
>
> Thanks!
>
>
>[/color]
Closed Thread