Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# writing to registry

Status
Not open for further replies.

kss444

Programmer
Sep 19, 2006
306
US
I am in the process of re-writting one of our applications in C#, using framework 3.5.

Our old vb6 app saved values in an ini file, I want to change this to save the values in the registry. I have this working just fine, but another developer who works here says that it will not work with windows 7.

They were saying windows 7 uses a hive and not the registry anymore.

Can anyone here shine some light on the subject.

Thanks,

Ordinary Programmer
 
I personally prefer configuration files, but if you want to write to the registry in Windows 7, you can. Your application will need to be configured to run as an administrator though.
 
>> uses a hive and not the registry

I think that 'hives' are the component parts of the 'registry'!


>> Your application will need to be configured to run as an
>> administrator

This will only be the case if you want to write to certain branches (e.g. HKEY_LOCAL_MACHINE); if you want to save settings on a per-user basis, in HKEY_CURRENT_USER, there is no need for any adminstrative privilege.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top