{"action":"created","issue":{"url":"https://api.github.com/repos/ferventcoder/chocolatey-packages/issues/69","labels_url":"https://api.github.com/repos/ferventcoder/chocolatey-packages/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/ferventcoder/chocolatey-packages/issues/69/comments","events_url":"https://api.github.com/repos/ferventcoder/chocolatey-packages/issues/69/events","html_url":"https://github.com/ferventcoder/chocolatey-packages/issues/69","id":81662607,"number":69,"title":"SysInternals install fails when run from Powershell DSC","user":{"login":"chrissimon-au","id":11002331,"avatar_url":"https://avatars.githubusercontent.com/u/11002331?v=3","gravatar_id":"","url":"https://api.github.com/users/chrissimon-au","html_url":"https://github.com/chrissimon-au","followers_url":"https://api.github.com/users/chrissimon-au/followers","following_url":"https://api.github.com/users/chrissimon-au/following{/other_user}","gists_url":"https://api.github.com/users/chrissimon-au/gists{/gist_id}","starred_url":"https://api.github.com/users/chrissimon-au/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrissimon-au/subscriptions","organizations_url":"https://api.github.com/users/chrissimon-au/orgs","repos_url":"https://api.github.com/users/chrissimon-au/repos","events_url":"https://api.github.com/users/chrissimon-au/events{/privacy}","received_events_url":"https://api.github.com/users/chrissimon-au/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-27T23:03:16Z","updated_at":"2015-05-28T21:36:27Z","closed_at":null,"body":"Powershell DSC runs as the system user, so it attempts to setup a shortcut in the start menu of the system user, and fails as it can't save the .lnk to \"C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Process Explorer.lnk\" as the path doesn't exist.\r\n\r\nSeems related to: https://github.com/ferventcoder/chocolatey-packages/issues/61, but not sure if it will fix it.\r\n\r\nFull error log:\r\n\r\n\t2015-05-27 22:27:29,384 [ERROR] -  Exception calling \"Save\" with \"0\" argument(s): \"Unable to save shortcut \"C:\\Win\r\n\t2015-05-27 22:27:29,400 [ERROR] -  dows\\system32\\config\\systemprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start \r\n\t2015-05-27 22:27:29,400 [ERROR] -  Menu\\Programs\\Process Explorer.lnk\".\"\r\n\t2015-05-27 22:27:29,400 [ERROR] -  At C:\\ProgramData\\chocolatey\\helpers\\functions\\Write-ChocolateyFailure.ps1:24 \r\n\t2015-05-27 22:27:29,400 [ERROR] -  char:3\r\n\t2015-05-27 22:27:29,400 [ERROR] -  +   throw \"$failureMessage\"\r\n\t2015-05-27 22:27:29,400 [ERROR] -  +   ~~~~~~~~~~~~~~~~~~~~~~~\r\n\t2015-05-27 22:27:29,400 [ERROR] -      + CategoryInfo          : OperationStopped: (Exception calli...Explorer.ln \r\n\t2015-05-27 22:27:29,400 [ERROR] -     k\".\":String) [], RuntimeException\r\n\t2015-05-27 22:27:29,400 [ERROR] -      + FullyQualifiedErrorId : Exception calling \"Save\" with \"0\" argument(s): \" \r\n\t2015-05-27 22:27:29,400 [ERROR] -     Unable to save shortcut \"C:\\Windows\\system32\\config\\systemprofile\\AppData\\  \r\n\t2015-05-27 22:27:29,400 [ERROR] -    Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Process Explorer.lnk\".\"\r\n\t2015-05-27 22:27:29,431 [ERROR] - The install of sysinternals was NOT successful.\r\n\r\nI've worked around for now with a DSC File dependency to create the path first but it's a bit of a hack.\r\n\r\n\t\tFile SysInternalsPath\r\n\t\t{\r\n\t\t\tEnsure = \"Present\"\r\n\t\t\tType = \"Directory\"\r\n\t\t\tDestinationPath = \"%systemroot%\\System32\\config\\systemprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\"\r\n\t\t}\r\n\t\t\r\n\t\tcChocoPackageInstaller installSysInternals\r\n\t\t{\r\n\t\t\tName = \"sysinternals\"\r\n\t\t\tDependsOn = @(\"[cChocoInstaller]installChoco\",\"[File]SysInternalsPath\")\r\n\t\t}\r\n\r\n\r\nWould be nicer if it handled the exception and didn't treat failure to add the shortcut as failure to install the package - or added to the start menu for all users, so admin users still have it even if installed via DSC."},"comment":{"url":"https://api.github.com/repos/ferventcoder/chocolatey-packages/issues/comments/106607084","html_url":"https://github.com/ferventcoder/chocolatey-packages/issues/69#issuecomment-106607084","issue_url":"https://api.github.com/repos/ferventcoder/chocolatey-packages/issues/69","id":106607084,"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":"2015-05-28T21:36:27Z","updated_at":"2015-05-28T21:36:27Z","body":"Yep, it's in the package -  https://github.com/ferventcoder/chocolatey-packages/blob/master/automatic/sysinternals/tools/chocolateyInstall.ps1#L33-L40\r\n\r\nThe helper in choco would work correctly, if this package were using it. Ugh"}}