Thread: Icon TaskBar
View Single Post
  #8  
Old 30-03-2022, 21:47
buttignol's Avatar
buttignol buttignol is offline
Registered User
 
Join Date: Sep 2012
Location: Brasil
Posts: 126
Thanks: 102
Thanked 16 Times in 13 Posts
buttignol is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
Code:
procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssDone then
  begin
    if userappdata.Checked then
      PinToTaskbar(ExpandConstant('{group}\{#MyAppName}.lnk'), true);
    PinToStartMenu(ExpandConstant('{group}\{#MyAppName}.lnk'), true);
  end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
  if CurUninstallStep = usUninstall then
  begin
    PinToTaskbar(ExpandConstant('{group}\{#MyAppName}.lnk'), false);
    PinToStartMenu(ExpandConstant('{group}\{#MyAppName}.lnk'), false);
  end;
end;
Now yes Solved
A small modification
Quote:
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssDone then begin
if task then
//if userappdata.Checked then
PinToTaskbar(ExpandConstant('{group}\{#AppName}.ln k'), true);
//PinToTaskbar(ExpandConstant('{app}\{#AppExec}'), true);
end;
Reply With Quote