Using the Kace K1000 VNC Button With Chrome And Firefox
Dell’s Kace K1000 appliance is a neat little device but it is not yet complete as a product. If you have a managed machine inside the K1000, you will see a small icon that opens your UltraVNC viewer and connects to that computer for remote management. Very handy! Unfortunately, it only works in IE. Bad, programmers, bad!
I wrote a user script for Chrome and Firefox (with Greasemonkey) that will make this work. It involves registering a protocol in your OS of choice (like http://, ftp://, etc) to open your VNC viewer and changing the link on the K1000 to point to that new protocol.
Below is the userscript. Copy it into your favorite text editor, change MYK1000APPLIANCE in the include line to be the location of your K1000 box and save it as named below. You can import it into Chrome by just dragging the file into an open Chrome window.
With Firefox, you will need to install Greasemonkey. After installation, the Greasemonkey icon should appear in the top right corner of Firefox. Click on the arrow beside the monkey, click “New User Script.” Give the script a name (Kace VNC Button) and a namespace (Kace), click OK. If it asks you to choose an editor, navigate to notepad (C:\Windows\Notepad) or some other text editor and the editor will open with a script skeleton already inside. Copy the contents of the file you saved (or the stuff below) and paste it inside the editor, replacing the previous contents. Save the file. The script should be installed.
Registering the VNC protocol in Windows 7
You will need two files. One you will import into the registry and the other is the script that is run when your browser communicates with vnc:// links.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\vnc] @="URL:VNC Connection" "URL Protocol"="" [HKEY_CLASSES_ROOT\vnc\DefaultIcon] @="c:\\progra~1\\UltraVNC\\vncviewer.exe" [HKEY_CLASSES_ROOT\vnc\shell] [HKEY_CLASSES_ROOT\vnc\shell\open] [HKEY_CLASSES_ROOT\vnc\shell\open\command] @="wscript.exe C:\\WINDOWS\\vnc.js %1"
var destination=(WScript.Arguments(0)) var search='vnc://' //Modify the path to VNC Viewer! var vncexe='c:\\progra~1\\UltraVNC\\vncviewer.exe' //WScript.Echo(destination) destination=destination.replace(search, "") destination=destination.replace('/', "") var ws = new ActiveXObject("WScript.Shell") //WScript.Echo(vncexe + " " + destination) ws.Exec(vncexe + " " + destination)
Save vnc.reg to a file and open the file. Windows will ask you to import the registry keys. Do it.
Save vnc.js to C:\windows\vnc.js . If you are not using UltraVNC, you may need to edit these files to point to the correct vncviewer.
Go to a machine’s inventory page and click on a VNC button. VNC should automatically connect to that machine’s IP address.
The userscript should be OS agnostic. I have not researched how to implement the url handlers on other OSes.
KBOX K1000 Version 5.3.47927
Windows 7 32-bit