Quote:
Originally Posted by KaktoR
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;