Registry

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mr. Novice

    #1

    Registry

    A co-worker and I are collaborating on a vb.net app that automates some of
    the processes our team uses. We wrote preferences for the application that
    are stored in the registry. Problem that the preferences are not stored
    unless the users have admin rights to their workstations. I know that many
    applications store information in the registry and are able to do this
    without the users having admin rights to the workstations.

    So the question is, how can I make it so that a vb.net app can write to the
    registry (or at least a certain piece of it) if the user is not a local admin?

    Thanks!!!

    -Chad
  • Stuart Nathan

    #2
    Re: Registry

    Use HKEY_LOCAL_MACH INE


    Comment

    • AlanT

      #3
      Re: Registry


      Not too sure about trying to run different parts of the application
      with different permissions but you may not need to.

      A user does not need admin privileges to write to the HKEY_CURRENT_US ER
      registry hive.

      The usual shape I have seen for settings in the registry is

      1) Place the default settings in the HKEY_LOCAL_MACH INE hive

      e.g.
      HKEY_LOCAL_MACH INE\Software\My App\Settings


      2) Whenever a user changes settings they are added to HKEY_CURRENT_US ER

      HKEY_CURRENT_US ER\Software\MyA pp\Settings

      or, if previously added, modified there

      3) When the application runs, it first checks for current user settings
      (if any) and
      if there are none, then it reads the defaults from local machine.


      hth,
      Alan.

      Comment

      Working...