PowerShell Scripting to Pin a Program to Taskbar

Joined
Sep 20, 2019
Messages
1
Reaction score
0
I am curious if there is a way via PowerShell Scripting to take an installed program such as Chrome and copy it to the taskbar on local machine. I know ive read alot saying Microsoft has disallowed this feature on windows 10. I also read where some people say you can create a shortcut on the Desktop or wherever and move it to the taskbar programs location. I have tried but as it moves the Chrome.lnk to the Taskbar location it doesnt seem to populate on the actual taskbar. Any assistance would be greatly appreciated.

-Brian-
 
Joined
Nov 19, 2013
Messages
6,297
Reaction score
1,274
You mean a shortcut, or the full program?
I actually have the Chrome shortcut on my taskbar. I dont’ recall any difficulties with the process. Not on my computer just now, but if you do not get an answer, I’ll experiment
 
Joined
Sep 26, 2017
Messages
3,611
Reaction score
624
If a program installation puts their icon on the Start menu or in the Tiles it is no problem to right-click it then click More then Pin to taskbar. If it is a Shortcut on the Desktop, right-click it and choose Pin to Start or Pin to taskbar. It is more difficult to add from Start or Tiles to the Desktop, one choice is to right-click and More then Open file location, make a Shortcut from the .exe file using Send to, Desktop (create a shortcut).
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
Any executable can be pinned to the task bar.

In Windows 10 though, pinning folders and/or other types of data files to Start menu is fine, but then choosing to pin them to your Taskbar is not intended - however, it can be achieved with a few steps. Just don't blame me if your taskbar ends up looking like an Apple Mac tablet.​

For example:
  • Suppose you have text file named Birthdays.txt located on your Desktop
  • Open your File Explorer then click File and select Change folder and search options. Next, select the view tab and remove check next to Hide extensions nor known file types then apply change.
  • Now, returning to Desktop, right-click on Birthdays and select rename and change the extension from .txt to .exe
    • Note: You'll be prompted to confirm your name change. Click yes.
  • Next, right-click on Birthdays.exe and select pin to taskbar
  • Next, right-click on Birthdays.exe and select rename, then change the .exe back to .txt, and click yes to confirm the change
  • Now, press and hold down your SHIFT key while at the same time right-clicking your pinned Birthdays on taskbar and select Properties. Here you will need to edit the Shortcut target, making sure it points to the correct path, and file name with the correct file extension [ in this example that being .txt ] given the Birthdays data file is a text file. If you wanted to you could also choose to change the icon that appears on your Taskbar here too.
  • Apply any changes made and you are ready to go.
In this case, clicking on the pinned Birthdays will open this file in Notepad.​

That's it -- as to whether its worth doing this -- I'll leave that up to individuals to decide what suits them best.

The same procedure will allow you to pin a folder/directory to your taskbar too!

Regedit32

ps: You'll probably want to change back to hidden extensions for files afterwards too.
 
Last edited:

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
Additional Information:

Since the 1607 build when Microsoft deprecated the powershell verb pintotaskbar, a new methodology was introduced using XML instead.

There are numerous articles on this online, but all of them seem to be a variation of the original located on Microsoft's servers.

Hence, I'd recommend this article to save mucking about:

https://docs.microsoft.com/en-us/windows/configuration/configure-windows-10-taskbar

If you are wondering why they change. Unfortunately, rogue programmers abused the verb to add not only an icon for their executable to your taskbar, but a multitude of additional pins.

There is currently a module developed by a third party that may work still, but I will not bother linking to it, given Microsoft are slowly but surely - yet actively - eliminating the possibilities in this area for the reason mentioned above; thus any short term solution, is just that!
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top