UAC and AD Groups

mcorrente

New Member
I've got a legacy program I'm trying to update. When the application starts it would check to determine if the user was a domain admin by using My.User.IsInRole("Domain Admins"). Now it appears that UAC screws up IsInRole for AD groups. If I start the program normally (UAC running the program as a standard user) My.User.IsInRole("Domain Admins") returns false (even though I'm logged in as a domain admin). When I run the program as administrator, it returns true. I can test non-admin groups (such as My.User.IsInRoll("Domain Users")) and it works fine, and I can test local administrator group just fine.

Any thoughts? I think if the code actually tried to do something that required administrator permission it would prompt me to elevate, but I don't see a way I can initiate that prompt myself to elevate to check role then lower again (because I'm trying to be a good Vista programmer and keep my users standard).
 

My Computer

Back
Top