{"action":"created","issue":{"url":"https://api.github.com/repos/chocolatey/choco/issues/627","repository_url":"https://api.github.com/repos/chocolatey/choco","labels_url":"https://api.github.com/repos/chocolatey/choco/issues/627/labels{/name}","comments_url":"https://api.github.com/repos/chocolatey/choco/issues/627/comments","events_url":"https://api.github.com/repos/chocolatey/choco/issues/627/events","html_url":"https://github.com/chocolatey/choco/issues/627","id":132985730,"number":627,"title":"Chocolatey: pin and unpin programs from task bar does not work on Windows 10 and Windows 7","user":{"login":"erotavlas85","id":11888321,"avatar_url":"https://avatars.githubusercontent.com/u/11888321?v=3","gravatar_id":"","url":"https://api.github.com/users/erotavlas85","html_url":"https://github.com/erotavlas85","followers_url":"https://api.github.com/users/erotavlas85/followers","following_url":"https://api.github.com/users/erotavlas85/following{/other_user}","gists_url":"https://api.github.com/users/erotavlas85/gists{/gist_id}","starred_url":"https://api.github.com/users/erotavlas85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erotavlas85/subscriptions","organizations_url":"https://api.github.com/users/erotavlas85/orgs","repos_url":"https://api.github.com/users/erotavlas85/repos","events_url":"https://api.github.com/users/erotavlas85/events{/privacy}","received_events_url":"https://api.github.com/users/erotavlas85/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-11T14:20:04Z","updated_at":"2016-02-11T14:42:18Z","closed_at":null,"body":"For instance\r\n```\r\nInstall-ChocolateyPinnedTaskBarItem \"${env:ProgramFiles(x86)}\\Mozilla Thunderbird\\thunderbird.exe\" I get these message\r\nTaskBar verb not found for System.__ComObject. It may have already been pinned\r\n'C:\\Program Files (x86)\\Mozilla Thunderbird\\thunderbird.exe' has been pinned to the task bar on your desktop however thunderbird is not pinned and there is no icon on the desktop.\r\n```\r\nI modified the source code of Install-ChocolateyPinnedTaskBarItem in order to print all the operations and this is the output\r\n\r\n```\r\nSplit-path C:\\Program Files\\Mozilla Firefox\r\nFolder System.__ComObject\r\nItem System.__ComObject\r\nItemVerb\r\nTaskBar verb not found for System.__ComObject. It may have already been pinned\r\n'C:\\Program Files\\Mozilla Firefox\\firefox.exe' has been pinned to the task bar on your desktop\r\nSplit-path C:\\Program Files (x86)\\Mozilla Thunderbird\r\nFolder System.__ComObject\r\nItem System.__ComObject\r\nItemVerb\r\nTaskBar verb not found for System.__ComObject.\r\n'C:\\Program Files (x86)\\Mozilla Thunderbird\\thunderbird.exe' has been pinned to the task bar on your desktop`\r\n```\r\nAm I making a mistake on calling the function?\r\n\r\nMoreover, I would like also to unpin programs. It seems that chocolatey does not have any function to do this. I found from this thread How to unpin \"Library\" folder from Task Bar using Powershell? this function that is the complementary of the previous pin function.\r\n\r\n```\r\nfunction Uninstall-ChocolateyPinnedTaskBarItem {\r\n<# .SYNOPSIS\r\nRemoves an item from the task bar linking to the provided path.\r\n.PARAMETER TargetFilePath\r\nThe path to the application that should be launched when clicking on the task bar icon.\r\n\r\n.EXAMPLE\r\nUninstall-ChocolateyPinnedTaskBarItem \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio 11.0\\Common7\\IDE\\devenv.exe\"\r\n\r\nThis will remove the Visual Studio task bar icon.\r\n#>\r\nparam(\r\n  [string] $targetFilePath \r\n)\r\n\r\nWrite-Debug \"Running 'Uninstall-ChocolateyPinnedTaskBarItem' with targetFilePath:`'$targetFilePath`'\";\r\n\r\nif (test-path($targetFilePath)) {\r\n  $verb = \"Unpin from Taskbar\"\r\n  $path= split-path $targetFilePath \r\n  $shell=new-object -com \"Shell.Application\"  \r\n  $folder=$shell.Namespace($path)    \r\n  $item = $folder.Parsename((split-path $targetFilePath -leaf)) \r\n  $itemVerb = $item.Verbs() | ? {$_.Name.Replace(\"&\",\"\") -eq $verb} \r\n  if($itemVerb -eq $null){ \r\n    Write-Host \"TaskBar verb not found for $item. It may have already been unpinned\"\r\n  } else { \r\n      $itemVerb.DoIt() \r\n  } \r\n  Write-Host \"`'$targetFilePath`' has been unpinned from the task bar on your desktop\"\r\n} else {\r\n  $errorMessage = \"`'$targetFilePath`' does not exist, not able to unpin from task bar\"\r\n}\r\nif($errorMessage){\r\n  Write-Error $errorMessage\r\n  throw $errorMessage\r\n}\r\n```\r\n\r\nIn the same way this does not work. I know that I can use other solutions like this https://gallery.technet.microsoft.com/ScriptCenter/b66434f1-4b3f-4a94-8dc3-e406eb30b750/. However, I prefer to use all stuff from chocolatey. Do you have any suggestions?"},"comment":{"url":"https://api.github.com/repos/chocolatey/choco/issues/comments/182892550","html_url":"https://github.com/chocolatey/choco/issues/627#issuecomment-182892550","issue_url":"https://api.github.com/repos/chocolatey/choco/issues/627","id":182892550,"user":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T14:42:18Z","updated_at":"2016-02-11T14:42:18Z","body":"@chocolatey/developers does anyone remember who worked on this one?"}}