Results 1 to 3 of 3

Thread: RegSaveKey and RegRestoreKey

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    15

    Question

    Guys-

    I am trying to write some code that will save a particular Registry Hive (using RegSaveKey.. created a binary dat file) and import a dat file (using RegRestoreKey).
    I found out that the user MUST have the SeBackupPrivilege and SeRestorePrivilege. Is there another API that allows me to do the same with the registry and does not require granting permissions to the user? (using advapi32.dll at the moment).
    Thanks for your help!
    Daniel Pinzas

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You need privileges so that random users don't screw up the DB. If they really need it, why not just grant them the permissions? You can only get at the registry through those functions, anyway.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    15
    What you said is true. Except that I want to avoid creating any type of security hole. For example, when a user with a mandatory profile logs-in, he is essentially loading a file (ntuser.man) to the registry (HKCU hive). How come it can be done then? Maybe Microsoft uses an API that we don't have access to?
    Daniel Pinzas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width