Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



[vb.net] registry access


4 replies to this topic - - - - -

#1 RATiO

    NeowinianÂł

  • 351 posts
  • Joined: 25-February 06
  • Location: England, UK
  • OS: Windows 7/8, Windows Phone, Android

Posted 05 January 2013 - 15:45

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?


#2 paxa

    Resident Fanatic

  • 735 posts
  • Joined: 04-June 04
  • Location: so far away....nearly in the end of the world

Posted 05 January 2013 - 21:27

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.

#3 +Dermot

    Irish Gaming

  • 205 posts
  • Joined: 26-August 04
  • Location: Republic Of Ireland
  • OS: Windows 7 64bit

Posted 06 January 2013 - 01:47

View PostRATiO, on 05 January 2013 - 15:45, said:

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?

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.

#4 togermano

    hot top for the bottoms

  • 425 posts
  • Joined: 29-December 02
  • Location: MA,USA
  • OS: win98se(For real)

Posted 25 January 2013 - 13:03

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

#5 wrack

    Wonderful Romeo Administering Caresses And Kisses

  • 2,203 posts
  • Joined: 09-December 06
  • Location: Melbourne, Australia

Posted 26 January 2013 - 12:22

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.