Can I use javascript in a Google Chrome packaged app (a.k.a. browser extension) to read a user's local registry key (i.e. stored query url, a.k.a. the search_url
key for Google Desktop)? If so, some example code to access this would be much appreciated!
Background / Detail
I am trying to write a browser plugin which opens up the users Google Desktop homepage in their Chrome browser. The url is: http://127.0.0.1:4664/&s={search_url key}
According to the Google Desktop API docs, this can be accomplished by using the HTTP/XML-Based Query API. I'm hoping that there is an HTML5 specification (e.g. File API) which provides a standard procedure to read local files, given the users permission.
In order to do this, I need read access for the local search_url
key. Depending on the user's OS, the API doc offers two possible local file locations that contain the search_url
key:
Windows
HKEY_CURRENT_USER\Software\Google\Google Desktop\API\search_url
Mac OS X
CFStringRef val = CFPreferencesCopyValue(
CFSTR("search_url"),
CFSTR("com.google.Desktop.WebServer"),
kCFPreferencesCurrentUser,
kCFPreferencesAnyHost);
if (val) {
// act on the value
CFRelease(val);
}
Alternative Approach for Windows OS
Apparently, NPAPI (http://code.google.com/chrome/extensions/npapi.html) allows a Chrome app to run a dll in Windows, but I'm not very familiar with the Windows API or VB and would like to avoid using them, if possible.