Here is the code from Inno Setup
function GetDirName(const Value: string): string;
var
InstallPath: string;
begin
RegQueryStringValue(HKLM, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\IconExtractor\DefaultIcon', '', InstallPath)
Result := InstallPath;
end;
The result is as below:
Result = C:\ProgramFiles\Solutions\Extractor\tools\v3\iconextractor.exe,1
But i only want to remove the last 3 path elements
C:\Program Files\Solutions\Extractor
How i can do it?