Windows queries the registry how to detect whether chrome.exe is installed
This article shows you windows query registry how to detect whether to install chrome.exe, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
Func CheckChrome () (string, bool) {regpath: = "Software\\ Microsoft\\ Windows\\ CurrentVersion\\ App Paths\\ chrome.exe" checkKey: = func (k * registry.Key) (string, bool) {s, _, err: = k.GetStringValue (") if err! = nil {return", false} return s, true} chs: = make (chan registry.Key 2) queryKey: = func (w * sync.WaitGroup, k registry.Key) {defer w.Done () key1, err: = registry.OpenKey (k, regpath, registry.ALL_ACCESS) if err = = nil {chs