Navigation: Samples >
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 and view the values that were created under HKEY_CURRENT_USER\Software\Kinook Software\Visual Build Professional 10\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.