├── LICENSE ├── README.md └── src ├── host ├── nativehost.json ├── nativehost.ps1 ├── register-host.bat ├── regjump │ └── readme.txt ├── run-host.bat └── unregister-host.bat ├── manifest.json ├── options.html ├── options.js ├── regedit-icon.png ├── regedit-logo.png └── script.js /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Igal Tabachnik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Chrome Registry Jumper 4 | ==== 5 | 6 | Chrome extension to open any selected Windows Registry path in Registry Editor using [Sysinternals RegJump](https://technet.microsoft.com/en-us/sysinternals/bb963880.aspx). 7 | 8 | Available in the Chrome Web Store 9 | 10 | ## Installation instructions 11 | 12 | **Windows 7 users**: This extension requires PowerShell 3, please download and install PowerShell 3 for your OS architecture: 13 | * 32-bit: http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.1-KB2506143-x86.msu 14 | * 64-bit: http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.1-KB2506143-x64.msu 15 | 16 | After installing the extension, a page with instructions will open. You have to follow the instructions, otherwise this extension **won't work**! 17 | 18 | You will need to navigate to where the extension is installed (e.g. `%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\ihjgnaklogcickonfphakiihgjpkdheh\1.0.1_0\host\`) and run the file `register-host.bat`. This will enable the native host app that communicates with RegJump. 19 | 20 | In addition, you will have to download RegJump and place it in the `regjump` folder. 21 | 22 | ## How does it work? 23 | 24 | The main goal of this extension is to send the selected text on a page (which should be a registry path, e.g. `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT`) to a utility from Sysinternals called [RegJump](https://technet.microsoft.com/en-us/sysinternals/bb963880.aspx), which handles the actual opening regedit and jumping to the specified key. 25 | 26 | However, it is not possible to launch 3rd party executables from Chrome directly - that's not allowed for very good reasons. 27 | 28 | Previously, it was possible to use [NPAPI](http://en.wikipedia.org/wiki/NPAPI) to host a native plugin in Chrome (like Java or Silverlight), but that was deprecated, and as of recently, [removed from Chrome completely](http://blog.chromium.org/2014/11/the-final-countdown-for-npapi.html). 29 | 30 | This leaves only one option - using Chrome's [Native Messaging](https://developer.chrome.com/extensions/nativeMessaging). The idea is, the *user* registers a native host app (by adding a key to the registry) which communicates with Chrome by passing messages (json). The native host app can then do whatever it is programmed to do. 31 | 32 | In this extension, the native host app is a PowerShell script which takes in the selected text from Chrome, and launches `regjump.exe` (which the user also has to download himself and put in the specified folder), passing it the selected text. 33 | 34 | If RegJump can parse this text as a valid registry path, it will launch regedit with the specified path (like jumping to path in Procmon). 35 | 36 | Finally, since Regedit requires elevation to launch, you will always get a UAC popup asking you to confirm before launching the actual `regedit.exe`. 37 | 38 | ![](http://i.imgur.com/RKibz8P.png) 39 | 40 | ### Bugs? Questions? Suggestions? 41 | 42 | Please feel free to [report them](../../issues) and send a pull request! 43 | 44 | ![](http://i.imgur.com/U6PJlH8.gif) 45 | -------------------------------------------------------------------------------- /src/host/nativehost.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.hmemcpy.chrome.regjump", 3 | "description": "Chrome Registry Jumper Native Host", 4 | "path": "run-host.bat", 5 | "type": "stdio", 6 | "allowed_origins": [ 7 | "chrome-extension://ihjgnaklogcickonfphakiihgjpkdheh/" 8 | ] 9 | } -------------------------------------------------------------------------------- /src/host/nativehost.ps1: -------------------------------------------------------------------------------- 1 | function Respond($response) { 2 | $msg = $response | ConvertTo-Json 3 | 4 | try { 5 | $writer = New-Object System.IO.BinaryWriter([System.Console]::OpenStandardOutput()) 6 | $writer.Write([int]$msg.Length) 7 | $buf = [System.Text.Encoding]::UTF8.GetBytes($msg) 8 | $writer.Write($buf) 9 | $writer.Close() 10 | } finally { 11 | $writer.Dispose() 12 | } 13 | } 14 | 15 | $regJump = [System.IO.Path]::Combine($PSScriptRoot, "regjump", "regjump.exe") 16 | 17 | try { 18 | $reader = New-Object System.IO.BinaryReader([System.Console]::OpenStandardInput()) 19 | $len = $reader.ReadInt32() 20 | $buf = $reader.ReadBytes($len) 21 | $msg = [System.Text.Encoding]::UTF8.GetString($buf) 22 | 23 | $obj = $msg | ConvertFrom-Json 24 | 25 | if ($obj.Status -eq "validate") { 26 | if (-not (Test-Path $regJump)) { 27 | return Respond @{message="regjump";regJumpPath=[System.IO.Path]::GetDirectoryName($regJump)} 28 | } 29 | 30 | return Respond @{message="ok"} 31 | } 32 | 33 | if (-not (Test-Path $regJump)) { 34 | 35 | $wshell = New-Object -ComObject Wscript.Shell 36 | $popup = @" 37 | Unable to locate 'regjump.exe' in '$([System.IO.Path]::GetDirectoryName($regJump))' 38 | 39 | Please download Sysinternals RegJump from the Microsoft website (https://technet.microsoft.com/en-us/sysinternals/bb963880.aspx), 40 | and place it in the directory above. 41 | 42 | Use 'Ctrl-C' to copy this message to the clipboard. 43 | "@ 44 | $wshell.Popup($popup,0,"Chrome Registry Jumper", 0x0 + 0x30) 45 | return 46 | } 47 | 48 | $si = New-Object System.Diagnostics.ProcessStartInfo($regJump) 49 | $si.Arguments = $obj.Text 50 | $si.Verb = "runas" 51 | 52 | [System.Diagnostics.Process]::Start($si) 53 | 54 | } finally { 55 | $reader.Dispose() 56 | } -------------------------------------------------------------------------------- /src/host/register-host.bat: -------------------------------------------------------------------------------- 1 | REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.hmemcpy.chrome.regjump" /ve /t REG_SZ /d "%~dp0nativehost.json" /f -------------------------------------------------------------------------------- /src/host/regjump/readme.txt: -------------------------------------------------------------------------------- 1 | 1. Download RegJump from the Microsoft website: https://technet.microsoft.com/en-us/sysinternals/bb963880.aspx 2 | 2. Place 'regjump.exe' in this directory -------------------------------------------------------------------------------- /src/host/run-host.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | pushd %~dp0 3 | @powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File ".\nativehost.ps1" 4 | -------------------------------------------------------------------------------- /src/host/unregister-host.bat: -------------------------------------------------------------------------------- 1 | REG DELETE "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.hmemcpy.chrome.regjump" /f -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Chome Registry Jumper", 4 | "author": "Igal Tabachnik", 5 | "homepage_url": "https://github.com/hmemcpy/ChromeRegJump", 6 | "description": "Opens the selected registry key in regedit using Sysinternals RegJump (https://technet.microsoft.com/en-us/sysinternals/bb963880)", 7 | "version": "1.0.1", 8 | "background": { 9 | "persistent": true, 10 | "scripts": [ "script.js" ] 11 | }, 12 | "options_page": "options.html", 13 | "permissions": ["contextMenus", "nativeMessaging"], 14 | "icons": { 15 | "16": "regedit-icon.png", 16 | "256": "regedit-logo.png" 17 | } 18 | } -------------------------------------------------------------------------------- /src/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Chrome Registry Jumper 5 | 6 | 7 | 8 | 9 |

Chrome Registry Jumper

10 | by 11 |
12 | 13 |

You're almost done! There are 2 things required to make this extension work:

14 |
    15 |
  1. 16 |

    17 | Download Sysinternals RegJump from Microsoft, and extract it to: 18 |

    19 |
    %LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\\_0\host\regjump
    20 | 21 |
  2. 22 |
  3. 23 |

    24 | Register the host program to communicate with RegJump, by running register-host.bat located in: 25 |

    26 |
    %LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\\_0\host
    27 |
  4. 28 |
29 | 30 | When you're done, press the Verify button to make sure everything is up and running! 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/options.js: -------------------------------------------------------------------------------- 1 | function verify() { 2 | var status = document.getElementById('status'); 3 | status.textContent = ''; 4 | chrome.runtime.sendNativeMessage('com.hmemcpy.chrome.regjump', { "status": "validate" }, function(response) { 5 | if (response == undefined) { 6 | status.setAttribute('class', 'alert alert-danger'); 7 | status.textContent = "Unable to communicate with RegJump. Please make sure you follow the installation instructions above."; 8 | } else if (response.message == 'regjump') { 9 | status.setAttribute('class', 'alert alert-warning') 10 | status.innerHTML = 'Unable to locate Microsoft RegJump. Please download it and extract it to: ' + '' + response.regJumpPath + ''; 11 | } else if (response.message == 'ok') { 12 | status.setAttribute('class', 'alert alert-info') 13 | status.textContent = 'All good!'; 14 | } 15 | }); 16 | } 17 | 18 | function setExtensionId() { 19 | var elements = document.getElementsByClassName('extension_id'); 20 | for (var i = 0; i < elements.length; i++) { 21 | elements[i].textContent = chrome.runtime.id; 22 | } 23 | elements = document.getElementsByClassName('version'); 24 | for (var i = 0; i < elements.length; i++) { 25 | elements[i].textContent = chrome.runtime.getManifest().version; 26 | } 27 | 28 | var author = document.getElementById('author'); 29 | author.textContent = chrome.runtime.getManifest().author; 30 | var version = document.getElementById('version'); 31 | version.textContent = "v" + chrome.runtime.getManifest().version; 32 | var homepage_url = document.getElementById('homepage_url'); 33 | homepage_url.href = chrome.runtime.getManifest().homepage_url; 34 | } 35 | 36 | document.addEventListener('DOMContentLoaded', setExtensionId); 37 | document.getElementById('verify').addEventListener('click', verify); 38 | -------------------------------------------------------------------------------- /src/regedit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmemcpy/ChromeRegJump/3c388afcc064b71bfe3dc71e286cc48512378c29/src/regedit-icon.png -------------------------------------------------------------------------------- /src/regedit-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmemcpy/ChromeRegJump/3c388afcc064b71bfe3dc71e286cc48512378c29/src/regedit-logo.png -------------------------------------------------------------------------------- /src/script.js: -------------------------------------------------------------------------------- 1 | var openInRegJump = function(selectedText) { 2 | chrome.runtime.sendNativeMessage('com.hmemcpy.chrome.regjump', { text: selectedText.trim() }, function(response) { 3 | console.log("Received " + response); 4 | }); 5 | } 6 | 7 | chrome.contextMenus.create({ 8 | title: "Open %s in Registry Editor", 9 | contexts:["selection"], 10 | onclick: function(info, tab) { 11 | openInRegJump(info.selectionText); 12 | } 13 | }); 14 | 15 | 16 | chrome.runtime.onInstalled.addListener(function(details){ 17 | if(details.reason == "install"){ 18 | var optionsUrl = chrome.extension.getURL('options.html'); 19 | 20 | chrome.tabs.query({url: optionsUrl}, function(tabs) { 21 | if (tabs.length) { 22 | chrome.tabs.update(tabs[0].id, {active: true}); 23 | } else { 24 | chrome.tabs.create({url: optionsUrl}); 25 | } 26 | }); 27 | } 28 | }); 29 | --------------------------------------------------------------------------------