Registry Writing

  • Thread starter Thread starter Sreppohcdoow
  • Start date Start date
S

Sreppohcdoow

I have a simple tool that I create that stores some settings in the
Registry... however, if the user running it doesn't have Admin priveleges on
the machine, the app fails when trying to write to the registry. I know
there are applications out there that can read/write to the registry w/o
Admin priveleges... is there some way to code around this in C#.NET? I.e.,
to have the program run the registry code in a different security context
somehow, or something?

Thx,
MS
 
MS,

No, they can not write to the registry if they do not have permissions.
It is possible that these tools might impersonate a user that has
permissions, but you would have to know the credentials of a user that has
permissions for the registry.

Keep your program as it is, and don't allow writing to the registry if
the user doesn't have permissions. There is a reason that there are
permissions on the registry in the first place, you know?

Hope this helps.
 
I have a simple tool that I create that stores some settings in the
Registry... however, if the user running it doesn't have Admin priveleges
on the machine, the app fails when trying to write to the registry. I know
there are applications out there that can read/write to the registry w/o
Admin priveleges... is there some way to code around this in C#.NET? I.e.,
to have the program run the registry code in a different security context
somehow, or something?

Are these per-user settings? If so then they should be under
HKEY_CURRENT_USER which each user has full rights to by default. Otherwise
follow Nicholas' advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top