If it finds a subkey different from the 'known' subkeys
- 'HARDWARE'
- 'SAM'
- 'SECURITY'
- 'SOFTWARE'
- 'SYSTEM'
The program can be found in the download area and http://nativeex.boot...ve/freeHive.zip
It can be included in one of the first scrips of a project, maybe into script.project
Peter
The 'basic' code:
Status := RegQueryInfoKey(HKEY_LOCAL_MACHINE, nil, nil, nil, @childNum, nil, nil, nil, nil, nil, nil, nil); if Status = ERROR_SUCCESS then begin for p := childNum - 1 downto 0 do begin Status := RegEnumKey(HKEY_LOCAL_MACHINE, p, PChar(childName), DefValueSize); value := PChar(childName); if (AnsiCompareText(value, 'HARDWARE') <> 0) and (AnsiCompareText(value, 'SAM') <> 0) and (AnsiCompareText(value, 'SECURITY') <> 0) and (AnsiCompareText(value, 'SOFTWARE') <> 0) and (AnsiCompareText(value, 'SYSTEM') <> 0) then RegUnLoadHive(HKEY_LOCAL_MACHINE, value); end; end;BTW: RegUnLoadHive is one of my own functions, I already use in regRedirect.