Chapter 10. Accessing the Windows Registry
Where to store software configuration settings in Windows has been a moving target for a long time. Although using the registry for this purpose has fallen out of favor, developers lean more towards using XML configuration files in the application's directory or storing them in %APPDATA%
,
%PROGRAMDATA%
, or in Isolated Storage, it's still useful to know the ins and outs of reading and writing to the registry.
Several of the WiX extensions query the registry for an array of data, such as finding the installed version of .NET, and you're bound to run into Windows settings that can only be found in the registry. You might also find it useful to store small amounts of installer-specific data, such as the application's install path.
In this chapter, we'll discuss the following topics:
Reading data stored in the registry
Writing to the registry
Performing miscellaneous tasks in the registry such as setting user permissions for registry keys