View Single Post
  #15  
Old 24-04-2020, 16:26
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,689
Thanks: 1,106
Thanked 7,336 Times in 2,838 Posts
KaktoR is on a distinguished road
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 View Post
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.
__________________
Haters gonna hate
Reply With Quote