Is there a way to determine (.NET preferably) if the current user is a domain user account or local user account?
Ahead of time - I don not know the domain name this is running on so I can't just look for DOMAIN\Username v COMPUTER\Username.
Part of the answer could be determining the DOMAIN or COMPUTER name from code.
[Edit] Expanding on Asher's answer a code fragment would be
private bool isCurrentUserLocalUser() { return Environment.MachineName == Environment.UserDomainName; }
you can use Environment.UserDomainName the MSDN documentation explains the exact behavior of this property in each case (domain/local account)
You can use this property in conjunction with other properties like Environment.MachineName to figure out what is the type of the user account being used.
Note that domain account is not necessarily Active Directory (can be that Novell Netware stuff)
You could look at the full username, which is either <domain name>\<username> or <machine name>\<username> for domain and local accounts respectively. If the first part matches the domain name, it's obviously a domain account and the opposite holds true.