Adding vnc protocol Windows

Have any had luck with adding a new protocol for handling the vnc:// to launch a vnc veiwer in windows?

like:

http:// would launch defualt browser
ftp:// ect ect

OK figured it out me thinks:

Install TightVNC Veiwer

add this to registry.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VNC]
@=“"URL:VNC Remote Session”
“URL Protocol”=“""”

[HKEY_CLASSES_ROOT\VNC\shell]
@=“”

[HKEY_CLASSES_ROOT\VNC\shell\open]

[HKEY_CLASSES_ROOT\VNC\shell\open\command]
@=“"C:\Program Files\TightVNC\tvnviewer.exe"”

1 Like

Ok, new update, install tightvnc veiwer. And save files bellow according to the paths in the related files. Edit if nessicary :slight_smile:

save as .js

var destination=(WScript.Arguments(0))
var search=‘vnc://’
//Modify the path to VNC Viewer!
var vncexe=‘C:\Program Files\TightVNC\tvnviewer.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 as .reg

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\vnc]
@=“URL:VNC Connection”
“URL Protocol”=""
[HKEY_CLASSES_ROOT\vnc\DefaultIcon]
@=“C:\WINDOWS\System32\mstsc.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”

1 Like