Jump to content
Sign in to follow this  
Followers 0

[vb.net] registry access

5 posts in this topic

Posted

Would a program made in vb.net that edits the registry need to be run as an adminsitrator or would a standard account be ok?
1 person likes this

Share this post


Link to post
Share on other sites

Posted

wrap the method inside an try/catch, compile and run the app as a normal user, if no exception is thrown than you're golden. otherwise you've got to modify your code to ensure the user as privileges to access the registry.

Share this post


Link to post
Share on other sites

Posted

[quote name='RATiO' timestamp='1357400738' post='595434328']
Would a program made in vb.net that edits the registry need to be run as an adminsitrator or would a standard account be ok?
[/quote]

Yes it would, but you shouldn't use the registry these days.

Use an ini file or xml file in %APPADATA%/yourapp so your app won't need to elevate to administrator

thats if you're trying to save to registry that is, if you just want to edit keys, yes you will have to elevate.
1 person likes this

Share this post


Link to post
Share on other sites

Posted

I think an ini file is the way to go but isnt there user level regs and system level regs?

Share this post


Link to post
Share on other sites

Posted

If the user is not Admin then HKLM would require admin access.

HKCU would be ok for the users without the need of admin access.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.