Jump to content



Photo

[vb.net] registry access


  • Please log in to reply
4 replies to this topic

#1 RATiO

RATiO

    Neowinian

  • Joined: 25-February 06
  • Location: England, UK
  • OS: Windows 7/8, 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

paxa

    Neowinian

  • 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

Dermot

    Gamer

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

Posted 06 January 2013 - 01:47

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

togermano

    hot top for the bottoms

  • 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

wrack

    Wireless Robotic Android Calibrated for Killing

  • 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.



Click here to login or here to register to remove this ad, it's free!