|
Navigation: Samples > RegEdit.bld Sample |
![]() ![]()
|
This sample shows how to use the Write Registry and Read Registry actions to create, update, and delete registry values. It also demonstrates the use of conditional build rules. The first set of steps create two registry values only if the macro DELETE is not defined; the second set of steps deletes the registry values if the macro DELETE is defined. The macro is not defined for this project, so the values will be created. Build the project, and then open the registry editor (by running RegEdit.exe from Start|Run or a command prompt) and view the values that were created under HKEY_CURRENT_USER\Software\Kinook Software\Visual Build Professional 7\Test Key).
Use the Chain.bld sample to see how to call this project so that DELETE is defined. Or, create a temporary or global macro called DELETE; then rebuild the project and the values will be deleted.
The unchecked steps demonstrate an alternative method, the Registry Editor, for updating registry values. This can also be used to import a predefined .REG script into the registry as part of configuring the build computer.