The purpose of this script is to clean up a Windows registry file from the redundant empty keys while preserving
the child keys. This may be useful for example when you want to compare two registry files side by side.
This is an example of a Windows registry file:
The registry file after executing the script:
Note
Please make sure that the registry file is sorted first before executing the script.
If the registry file is not sorted, you can sort it with this script: RegIniFileSort
the child keys. This may be useful for example when you want to compare two registry files side by side.
This is an example of a Windows registry file:
Code: Select all
[HKEY_CURRENT_USER\System\CurrentControlSet\Control]
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties]
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties]
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\Network]
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\Network\NetworkLocationWizard]
"ShowCount"=dword:00000018
Code: Select all
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties]
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\Network\NetworkLocationWizard]
"ShowCount"=dword:00000018
Note
Please make sure that the registry file is sorted first before executing the script.
If the registry file is not sorted, you can sort it with this script: RegIniFileSort