Add Desktop Icon To Taskbar |work|

Categories: Geological modelling
Wishlist Share
Share Course
Page Link
Share On Social Media

Add Desktop Icon To Taskbar |work|

$shortcut = (Get-ChildItem "$env:USERPROFILE\Desktop\*.lnk" | Where-Object $_.Name -like "*MyApp*").FullName $shell = New-Object -ComObject Shell.Application $target = (New-Object -ComObject WScript.Shell).CreateShortcut($shortcut).TargetPath $shell.Namespace(0x0a).ParseName($target).InvokeVerb("taskbarpin")

| Desktop icon is a shortcut to... | Best method | |----------------------------------|--------------| | Application (.exe) | Drag & drop to taskbar | | Folder | Pin explorer.exe with folder path | | Website | Pin browser with URL argument | | Control Panel item | Pin control.exe "item name" | | Recycle Bin | Not possible (use toolbar or third-party tool) | add desktop icon to taskbar

Before proceeding, understand:

To add a desktop icon to your taskbar, you can use the Pin to Taskbar feature. This allows you to keep frequently used applications just one click away, even when they are closed. YouTube +1 How to Pin an Icon You can quickly pin an application using several different methods: From the Desktop $shortcut = (Get-ChildItem "$env:USERPROFILE\Desktop\*