{"action":"created","issue":{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/88","labels_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/88/comments","events_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/88/events","html_url":"https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/88","id":103941801,"number":88,"title":"Invoke-HKCURegistrySettingsForAllUsers hangs on Remove-RegistryKey","user":{"login":"AcidUser85","id":13620987,"avatar_url":"https://avatars.githubusercontent.com/u/13620987?v=3","gravatar_id":"","url":"https://api.github.com/users/AcidUser85","html_url":"https://github.com/AcidUser85","followers_url":"https://api.github.com/users/AcidUser85/followers","following_url":"https://api.github.com/users/AcidUser85/following{/other_user}","gists_url":"https://api.github.com/users/AcidUser85/gists{/gist_id}","starred_url":"https://api.github.com/users/AcidUser85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AcidUser85/subscriptions","organizations_url":"https://api.github.com/users/AcidUser85/orgs","repos_url":"https://api.github.com/users/AcidUser85/repos","events_url":"https://api.github.com/users/AcidUser85/events{/privacy}","received_events_url":"https://api.github.com/users/AcidUser85/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/labels/resolved","name":"resolved","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"amotaz","id":13512483,"avatar_url":"https://avatars.githubusercontent.com/u/13512483?v=3","gravatar_id":"","url":"https://api.github.com/users/amotaz","html_url":"https://github.com/amotaz","followers_url":"https://api.github.com/users/amotaz/followers","following_url":"https://api.github.com/users/amotaz/following{/other_user}","gists_url":"https://api.github.com/users/amotaz/gists{/gist_id}","starred_url":"https://api.github.com/users/amotaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amotaz/subscriptions","organizations_url":"https://api.github.com/users/amotaz/orgs","repos_url":"https://api.github.com/users/amotaz/repos","events_url":"https://api.github.com/users/amotaz/events{/privacy}","received_events_url":"https://api.github.com/users/amotaz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/milestones/6","html_url":"https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/milestones/v3.6.6","labels_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/milestones/6/labels","id":1264506,"number":6,"title":"v3.6.6","description":"Issues and enhancements requests targeted for v3.6.6 of the toolkit.","creator":{"login":"mmashwani","id":5581235,"avatar_url":"https://avatars.githubusercontent.com/u/5581235?v=3","gravatar_id":"","url":"https://api.github.com/users/mmashwani","html_url":"https://github.com/mmashwani","followers_url":"https://api.github.com/users/mmashwani/followers","following_url":"https://api.github.com/users/mmashwani/following{/other_user}","gists_url":"https://api.github.com/users/mmashwani/gists{/gist_id}","starred_url":"https://api.github.com/users/mmashwani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmashwani/subscriptions","organizations_url":"https://api.github.com/users/mmashwani/orgs","repos_url":"https://api.github.com/users/mmashwani/repos","events_url":"https://api.github.com/users/mmashwani/events{/privacy}","received_events_url":"https://api.github.com/users/mmashwani/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2015-08-20T12:32:43Z","updated_at":"2015-08-31T13:17:23Z","due_on":"2015-09-06T05:00:00Z","closed_at":null},"comments":14,"created_at":"2015-08-30T19:37:20Z","updated_at":"2015-09-01T02:26:40Z","closed_at":null,"body":"Hello,\r\n\r\nI use the following code to cleanup trashy per-user Chrome installations:\r\n\r\n $UserProfiles = Get-UserProfiles\r\n \r\n[scriptblock]$HKCURegistrySettings =\r\n{\r\n\tRemove-RegistryKey -Key 'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome' -SID $UserProfile.SID\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\\\.htm' -SID $UserProfile.SID\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\\\.html' -SID $UserProfile.SID\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\\\.shtml' -SID $UserProfile.SID\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\\\.xht'\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\\\.xhtml' -SID $UserProfile.SID\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\ftp' -SID $UserProfile.SID\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\http' -SID $UserProfile.SID\r\n\tRemove-RegistryKey -Key 'HKCU\\Software\\Classes\\https' -SID $UserProfile.SID\r\n}\r\nInvoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings\r\n\r\nWhat I might be doing wrong?\r\nThe script hangs as seen from the log:\r\n\r\n<![LOG[[Pre-Installation] :: The User [TESTPC\\testuser] registry hive is already loaded in path [HKEY_USERS\\S-1-5-21-911290157-3523553640-4879166865-1000].]LOG]!><time=\"15:30:07.490120\" date=\"08-28-2015\" component=\"Invoke-HKCURegistrySettingsForAllUsers\" context=\"NT AUTHORITY\\SYSTEM\" type=\"1\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n<![LOG[[Pre-Installation] :: Execute ScriptBlock to modify HKCU registry settings for all users.]LOG]!><time=\"15:30:07.501120\" date=\"08-28-2015\" component=\"Invoke-HKCURegistrySettingsForAllUsers\" context=\"NT AUTHORITY\\SYSTEM\" type=\"1\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n<![LOG[[Pre-Installation] :: Return fully qualified registry key path [Registry::Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome].]LOG]!><time=\"15:30:07.539120\" date=\"08-28-2015\" component=\"Convert-RegistryPath\" context=\"NT AUTHORITY\\SYSTEM\" type=\"1\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n<![LOG[[Pre-Installation] :: Unable to delete registry key [Registry::Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome] because it does not exist.]LOG]!><time=\"15:30:07.547120\" date=\"08-28-2015\" component=\"Remove-RegistryKey\" context=\"NT AUTHORITY\\SYSTEM\" type=\"2\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n<![LOG[[Pre-Installation] :: Return fully qualified registry key path [Registry::HKEY_USERS\\S-1-5-21-911290157-3523553640-4879166865-1000\\Software\\Classes\\\\.htm].]LOG]!><time=\"15:30:07.572120\" date=\"08-28-2015\" component=\"Convert-RegistryPath\" context=\"NT AUTHORITY\\SYSTEM\" type=\"1\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n<![LOG[[Pre-Installation] :: Unable to delete registry key [Registry::HKEY_USERS\\S-1-5-21-911290157-3523553640-4879166865-1000\\Software\\Classes\\\\.htm] because it does not exist.]LOG]!><time=\"15:30:07.579120\" date=\"08-28-2015\" component=\"Remove-RegistryKey\" context=\"NT AUTHORITY\\SYSTEM\" type=\"2\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n<![LOG[[Pre-Installation] :: Return fully qualified registry key path [Registry::HKEY_USERS\\S-1-5-21-911290157-3523553640-4879166865-1000\\Software\\Classes\\\\.html].]LOG]!><time=\"15:30:07.604120\" date=\"08-28-2015\" component=\"Convert-RegistryPath\" context=\"NT AUTHORITY\\SYSTEM\" type=\"1\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n<![LOG[[Pre-Installation] :: Delete registry key [Registry::HKEY_USERS\\S-1-5-21-911290157-3523553640-4879166865-1000\\Software\\Classes\\\\.html].]LOG]!><time=\"15:30:07.611120\" date=\"08-28-2015\" component=\"Remove-RegistryKey\" context=\"NT AUTHORITY\\SYSTEM\" type=\"1\" thread=\"2384\" file=\"Deploy-Application.ps1\">\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/comments/136555006","html_url":"https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/88#issuecomment-136555006","issue_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/88","id":136555006,"user":{"login":"amotaz","id":13512483,"avatar_url":"https://avatars.githubusercontent.com/u/13512483?v=3","gravatar_id":"","url":"https://api.github.com/users/amotaz","html_url":"https://github.com/amotaz","followers_url":"https://api.github.com/users/amotaz/followers","following_url":"https://api.github.com/users/amotaz/following{/other_user}","gists_url":"https://api.github.com/users/amotaz/gists{/gist_id}","starred_url":"https://api.github.com/users/amotaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amotaz/subscriptions","organizations_url":"https://api.github.com/users/amotaz/orgs","repos_url":"https://api.github.com/users/amotaz/repos","events_url":"https://api.github.com/users/amotaz/events{/privacy}","received_events_url":"https://api.github.com/users/amotaz/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T02:26:40Z","updated_at":"2015-09-01T02:26:40Z","body":"Added a check for child keys when -Recurse parameter is not specified. It will throw an error if child keys are detected."}}