├── 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 |
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 | 
39 |
40 | ### Bugs? Questions? Suggestions?
41 |
42 | Please feel free to [report them](../../issues) and send a pull request!
43 |
44 | 
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 |
17 | Download Sysinternals RegJump from Microsoft, and extract it to: 18 |
19 |%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\\_0\host\regjump20 | 21 |
24 | Register the host program to communicate with RegJump, by running register-host.bat located in:
25 |
%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\\_0\host27 |