Note that there are some explanatory texts on larger screens.

plurals
  1. PORead Local Registry with Browser Based Javascript - Google Desktop API
    primarykey
    data
    text
    <p>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 <em><code>search_url</code> key</em> for Google Desktop)? If so, some example code to access this would be much appreciated!</p> <h2>Background / Detail</h2> <p>I am trying to write a browser plugin which opens up the users Google Desktop homepage in their Chrome browser. The url is: <code>http://127.0.0.1:4664/&amp;s={search_url key}</code></p> <p>According to the Google Desktop API docs, this can be accomplished by using the <a href="http://code.google.com/apis/desktop/docs/queryapi.html#httpxml" rel="nofollow">HTTP/XML-Based Query API</a>. 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. </p> <p>In order to do this, I need read access for the local <em><code>search_url</code> key</em>. Depending on the user's OS, the API doc offers two possible local file locations that contain the <em><code>search_url</code> key</em>:</p> <p><strong>Windows</strong></p> <pre><code>HKEY_CURRENT_USER\Software\Google\Google Desktop\API\search_url </code></pre> <p><strong>Mac OS X</strong></p> <pre><code>CFStringRef val = CFPreferencesCopyValue( CFSTR("search_url"), CFSTR("com.google.Desktop.WebServer"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); if (val) { // act on the value CFRelease(val); } </code></pre> <h2>Alternative Approach for Windows OS</h2> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload