'Is it possible to 'Pin to taskbar' using Inno Setup? [duplicate]

I am using the Inno Setup to package the Windows installer, during the install process,I need to provide options for the user to create a desktop shortcut and pin the shortcut in the taskbar.

I can create the desktop shortcut like this:

[Tasks]
Name: "desktopicon";
Description: "{cm:CreateDesktopIcon}";
GroupDescription: "{cm:AdditionalIcons}";
Flags: checkablealone,

However, I can not find a way to pin the shortcut in the taskbar.

I have done some preliminary research but have not been able to find a solution.



Solution 1:[1]

See solution at your problem in the post at https://switch-case.com/51148020

This is a include script

function PinAppTo(const FileName: string; PinDest: TPinDest): Boolean;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jacques Houbart