Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / June 2004

Tip: Looking for answers? Try searching our database.

Determining User Rights at run time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Billg_sd - 29 Jun 2004 17:04 GMT
Is there a programmatic way to determine if the user has sufficient local rights to update the registry (HKLM\SOFTWARE\MYPRODUCT) and create/modify a local file (C:\Program Files\MyProductDir)?  

I've written my own custom installer.  I'd like to perform these tests before installation begins, without having to determine if the user is logged in as ADMINISTRATOR.  

-Billg_sd
Rob Teixeira [MVP] - 30 Jun 2004 00:34 GMT
There's some built-in support for ACL (access control lists) and secruity
descriptors in .NET 2.0, but in .NET 1.1 you have to do it all through
p/invoke (most of the functions you need are in advapi32.dll).
There's also a C# wrapper sample project on GotDotNet.com that makes this a
little easier. Here's the link, but I have to warn you I haven't used it
yet, so I don't make any guarantees about it's stability or usability -
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-
dda0-48b8-9abf-e0705af065d9


-Rob Teixeira [MVP]

> Is there a programmatic way to determine if the user has sufficient local rights to update the registry (HKLM\SOFTWARE\MYPRODUCT) and create/modify a
local file (C:\Program Files\MyProductDir)?

> I've written my own custom installer.  I'd like to perform these tests before installation begins, without having to determine if the user is
logged in as ADMINISTRATOR.

> -Billg_sd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.