{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/80264608","id":80264608,"diff_hunk":"@@ -90,53 +89,66 @@ func findDokanUninstall(list bool, wow64 bool) (result int) {\n \n \tk, err := registry.OpenKey(registry.LOCAL_MACHINE, \"SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall\", access)\n \tif err != nil {\n-\t\tfmt.Printf(\"Error %s opening uninstall subkeys\\n\", err.Error())\n+\t\tlog.Printf(\"Error opening SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall : %s\\n\", err.Error())\n \t\treturn\n \t}\n-\tdefer k.Close()\n \n-\tnames, err := k.ReadSubKeyNames(-1)\n+\tkb, err := registry.OpenKey(registry.CURRENT_USER, \"SOFTWARE\\\\Keybase\\\\Keybase\", access)\n \tif err != nil {\n-\t\tfmt.Printf(\"Error %s reading subkeys\\n\", err.Error())\n+\t\tlog.Printf(\"Error opening SOFTWARE\\\\Keybase\\\\Keybase:  %s\\n\", err.Error())\n \t\treturn\n \t}\n-\tfor _, name := range names {\n-\t\tsubKey, err := registry.OpenKey(k, name, registry.QUERY_VALUE)\n+\tdefer k.Close()\n+\tdefer kb.Close()\n+\n+\tvar codes []string\n+\tdokanProductCode86, _, err := kb.GetStringValue(\"DOKANPRODUCT86\")\n+\tif err == nil {\n+\t\tcodes = append(codes, dokanProductCode86)\n+\t}\n+\n+\tdokanProductCode64, _, err := kb.GetStringValue(\"DOKANPRODUCT64\")\n+\tif err == nil {\n+\t\tcodes = append(codes, dokanProductCode64)\n+\t}\n+\n+\tfor _, code := range codes {\n+\t\tsubKey, err := registry.OpenKey(k, code, registry.QUERY_VALUE)\n \t\tif err != nil {\n-\t\t\tfmt.Printf(\"Error %s opening subkey %s\\n\", err.Error(), name)\n+\t\t\t// This is not an error; we usually will find only one\n+\t\t\t// fmt.Printf(\"Error %s opening subkey %s\\n\", err.Error(), code)\n+\t\t\tcontinue\n \t\t}\n \n \t\tdisplayName, _, err := subKey.GetStringValue(\"DisplayName\")\n \t\tif list {\n-\t\t\tfmt.Printf(\"  %s -- %s\\n\", name, displayName)\n+\t\t\tlog.Printf(\"  %s -- %s\\n\", code, displayName)\n \t\t}\n-\t\tif err == nil && strings.HasPrefix(displayName, \"Dokan Library\") {\n \n-\t\t\tfmt.Printf(\"Found %s  %s\\n\", displayName, name)\n-\t\t\tuninstall, _, err := subKey.GetStringValue(\"QuietUninstallString\")\n-\t\t\tif err != nil {\n-\t\t\t\tuninstall, _, err = subKey.GetStringValue(\"UninstallString\")\n-\t\t\t}\n-\t\t\tif err != nil {\n-\t\t\t\tfmt.Printf(\"Error %s opening subkey UninstallString\", err.Error())\n-\t\t\t} else {\n-\t\t\t\tresult = mergeResults(result, doUninstallAction(uninstall, list))\n-\t\t\t}\n+\t\tuninstall, _, err := subKey.GetStringValue(\"QuietUninstallString\")\n+\t\tif err != nil {","path":"go/tools/dokanclean/main.go","position":107,"original_position":107,"commit_id":"b12533bf505dfe609f3814e995321cf0cf099f43","original_commit_id":"b12533bf505dfe609f3814e995321cf0cf099f43","user":{"login":"zanderz","id":862397,"avatar_url":"https://avatars.githubusercontent.com/u/862397?v=3","gravatar_id":"","url":"https://api.github.com/users/zanderz","html_url":"https://github.com/zanderz","followers_url":"https://api.github.com/users/zanderz/followers","following_url":"https://api.github.com/users/zanderz/following{/other_user}","gists_url":"https://api.github.com/users/zanderz/gists{/gist_id}","starred_url":"https://api.github.com/users/zanderz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanderz/subscriptions","organizations_url":"https://api.github.com/users/zanderz/orgs","repos_url":"https://api.github.com/users/zanderz/repos","events_url":"https://api.github.com/users/zanderz/events{/privacy}","received_events_url":"https://api.github.com/users/zanderz/received_events","type":"User","site_admin":false},"body":"The intent is for `UninstallString` to be the default, but use `QuietUninstallString` if available.","created_at":"2016-09-23T15:12:27Z","updated_at":"2016-09-23T15:12:27Z","html_url":"https://github.com/keybase/client/pull/4389#discussion_r80264608","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/4389","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/80264608"},"html":{"href":"https://github.com/keybase/client/pull/4389#discussion_r80264608"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/4389"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/4389","id":86401414,"html_url":"https://github.com/keybase/client/pull/4389","diff_url":"https://github.com/keybase/client/pull/4389.diff","patch_url":"https://github.com/keybase/client/pull/4389.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/4389","number":4389,"state":"open","locked":false,"title":"windows dokanclean: Use registry breadcrumb","user":{"login":"zanderz","id":862397,"avatar_url":"https://avatars.githubusercontent.com/u/862397?v=3","gravatar_id":"","url":"https://api.github.com/users/zanderz","html_url":"https://github.com/zanderz","followers_url":"https://api.github.com/users/zanderz/followers","following_url":"https://api.github.com/users/zanderz/following{/other_user}","gists_url":"https://api.github.com/users/zanderz/gists{/gist_id}","starred_url":"https://api.github.com/users/zanderz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanderz/subscriptions","organizations_url":"https://api.github.com/users/zanderz/orgs","repos_url":"https://api.github.com/users/zanderz/repos","events_url":"https://api.github.com/users/zanderz/events{/privacy}","received_events_url":"https://api.github.com/users/zanderz/received_events","type":"User","site_admin":false},"body":"This is the change that will prevent us from uninstalling someone else's Dokan.\r\nAlso added a logger object.\r\n\r\n@maxtaco @oconnor663 ","created_at":"2016-09-22T19:42:34Z","updated_at":"2016-09-23T15:12:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a7b6103ac76c92d8c1f2421727dbc9f8b5fe9b9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/4389/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/4389/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/4389/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/b12533bf505dfe609f3814e995321cf0cf099f43","head":{"label":"keybase:zanderz/CORE-3743","ref":"zanderz/CORE-3743","sha":"b12533bf505dfe609f3814e995321cf0cf099f43","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2016-09-23T00:14:13Z","pushed_at":"2016-09-23T15:11:02Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":162759,"stargazers_count":773,"watchers_count":773,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":514,"forks":71,"open_issues":514,"watchers":773,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"c6c85f2ba930c87e1e2682caab46563fe0eed295","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2016-09-23T00:14:13Z","pushed_at":"2016-09-23T15:11:02Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":162759,"stargazers_count":773,"watchers_count":773,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":514,"forks":71,"open_issues":514,"watchers":773,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/4389"},"html":{"href":"https://github.com/keybase/client/pull/4389"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/4389"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/4389/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/4389/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/4389/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/b12533bf505dfe609f3814e995321cf0cf099f43"}}}}
{"actor":{"display_login":"zanderz"}}