View Single Post
  #1381  
Old 24-04-2020, 16:21
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
So, how to delete the shortcuts after uninstall?

IS help tells me to do this through [UninstallDelete], but how?
You can do it through [UninstallDelete].
But as the shortcut was created on installation in the code, you can remove this shortcut using the code in the:
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);

Code:
if IniKeyNotEmpty('Executable', 'Exe') then
begin
  DeleteFile(ExpandConstant('{commonstartmenu}\' + GetIniString('Executable', 'ExeName', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'));
end;
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;

Last edited by Cesar82; 24-04-2020 at 16:25.
Reply With Quote
Sponsored Links