Newly (looks like Microsoft created article in 07/2022), it is possible to create Applications pins programatically, but it might be allowed only to UWP. See MSDN for more details:
You can programmatically pin your own app to the taskbar, just like you can pin your app to the Start menu. And you can check whether your app is currently pinned, and whether the taskbar allows pinning.
However, the WIX installer does not have any support for that at the moment - you might need to create those pins yourself from the application at start-time. You can follow the official sample code from GitHub or this summarized example for C# application:
using System;
using Windows.Foundation.Metadata;
using Windows.UI.Shell;
async void SetPinAsync()
{
// Check if the Taskbar API is present
if (ApiInformation.IsTypePresent("Windows.UI.Shell.TaskbarManager") == false)
return;
// Get the taskbar manager
var taskbarManager = TaskbarManager.GetDefault();
// Check if taskbar allows pinning
// It can be blocked for reasons(no taskbar || blocked by Policy || ...)
if (taskbarManager?.IsPinningAllowed == false)
return;
// Check if the application is currently pinned
bool isPinned = await taskbarManager.IsCurrentAppPinnedAsync();
if (isPinned == false)
{
// Try to pin application and get result whether it succeeded
bool didPin = await TaskbarManager.GetDefault().RequestPinCurrentAppAsync();
}
}