![]() It looks like there is two things important to consider when pinning something. To conclude, for your needs, you'd call it like this: New-PinnedItem -Path 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -Arguments '-proxy-server=192.168.1.2:8080' Remove-Item -LiteralPath "HKCU:Software\Classes\*\shell\pin\" -Recurse $Item = $Folder.ParseName((Get-Item $ShortcutPath).Name) ![]() $Folder = $Shell.Namespace((Get-Item $ShortcutPath).DirectoryName) If ($Ke圓.SubKe圜ount -eq 0 -and $Ke圓.ValueCount -eq 0) $Item = $Folder.ParseName((Get-Item $Target).Name) $Folder = $Shell.Namespace((Get-Item $Target).DirectoryName) $Shell = New-Object -ComObject "Shell.Application" ![]() $Key4 = $Ke圓.CreateSubKey($KeyPath4, $true) $Ke圓 = $Key2.CreateSubKey($KeyPath3, $true) $Key2 = (Get-Item $KeyPath1).OpenSubKey($KeyPath2, $true) "Explorer\CommandStore\shell\Windows.taskbarpin")).ExplorerCommandHandler $ValueData = (Get-ItemProperty("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\" It seems like the code presumes the target executable doesn't have any parameters. ![]() However, if I try to add a command-line parameter to the program, like the example below, it doesn't work. I am able to pin programs to the Windows 10 Taskbar using the below code (thanks to this StackOverflow question). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |