You are here

Usage of the sections [RegistryCleanupIfEmpty] and [RegistryCleanupForce]

4 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
Usage of the sections [RegistryCleanupIfEmpty] and [RegistryCleanupForce]
  1. Usage of the section [RegistryCleanupIfEmpty]

    Suppose a program named AppName writes its settings in the following two registry keys:

    • HKCU\Software\AppName_1\settings_1
    • HKCU\Software\AppName_2\settings_2

    Furthermore after saving of these both registry keys by the launcher the registry keys HKCU\Software\AppName_1 and HKCU\Software\AppName_2 will be left empty.

    Is it in this case correct, that I use the following code, where the key names are consecutive integers?

    [RegistryCleanupIfEmpty]
    1=HKCU\Software\AppName_1
    2=HKCU\Software\AppName_2
    

    Or can I instead also use the following code, where the key names are non-consecutive integers?

    [RegistryCleanupIfEmpty]
    1=HKCU\Software\AppName_1
    1=HKCU\Software\AppName_2
    
  2. Usage of the section [RegistryCleanupForce]

    Suppose a program named AppName writes its settings in the following two registry keys:

    • HKCU\Software\AppName_1\settings_1
    • HKCU\Software\AppName_2\settings_2

    Furthermore the informations in these both registry keys are useless.

    Is it in this case correct, that I use the following code, where the key names are consecutive integers?

    [RegistryCleanupForce]
    1=HKCU\Software\AppName_1\settings_1
    2=HKCU\Software\AppName_2\settings_2
    
Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Consecutive; never

1. Use consecutive numbers, always.
2. I can't think of a good use case for [RegistryCleanupForce]. Just use [RegistryCleanupIfEmpty], or better yet, [RegistryKeys] (yes, I've read that the information is useless).

Previously known as kAlug.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
Usage of consecutive numbers

I've again thought about the topic of the use of consecutive numbers. And probably is it in every case necessary, where still left more than one empty registry key, that I must use for the key names consecutive integers. Accordingly it isn't important, if it's just a registry key with several subkeys or whether these are completely different registry keys. Apparently only the exact choice of the consecutive numbers is in certain cases significant, how it is described in the example case in the documentation.

Aluísio A. S. G.
Offline
Last seen: 8 years 4 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Correct

If the keys are nested, do as the documentation shows.
If the keys are parallel (like in your post), it doesn't matter the order, as long as you begin in 1 and the numbers are consecutive.

Previously known as kAlug.

Log in or register to post comments