I did it this way too, but doesn't work.
My old code
Code:
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
case of usPostUninstall
begin
DeleteFile(ExpandConstant('{userdesktop}\' + GetIniString('Executable', 'Shortcut1Name', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'));
DeleteFile(ExpandConstant('{userstartmenu}\' + GetIniString('Executable', 'Shortcut1Name', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'));
end;
Maybe I should have test this with ForceDirectories function?
Edit:
Quote:
Originally Posted by Cesar82
In this way, the Settings.ini file must be copied to the installation folder during installation and when uninstalling it must be copied to the temp folder at:
function InitializeUninstall (): Boolean;
|
Ok, that explains alot. Unfortunatelly not an option for me.