1

So I've made a shortcut for testing purposes, and here's the target:

"C:\Program Files\uvnc bvba\UltraVNC\vncviewer.exe" -connect 111.222.333.444:1 -notoolbar -nostatus -quickoption 3

As you can see I'm trying to pass the ip argument as %1 however it's not working (yes I'm using a working ip, as I connect to it on a regular basis using that shortcut I made):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\vnc]
@="URL:vnc Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\vnc\shell\open\command]
@="\"C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe\" -connect %1:1 -notoolbar -nostatus -quickoption 3"
Bren
  • 605
  • 4
  • 15

2 Answers2

1
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\vnc]
@="URL:vnc Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\vnc\shell\open\command]
@="cmd /V:ON /C set address=%1 && set address=!address:~6,-2! && \"C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe\" -connect !address!-notoolbar -nostatus -noauto -8greycolors"
  • This is the correct answer. The whole href content of the A link is passed as argument to vncviewer. You need to extract the host/port with the substring command that is suggested by Giulio – Michele mpp Marostica Oct 10 '22 at 23:02
0

A small improvement - the cmd window is automatically closed, leaving only the UltraVNC window.

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\vnc]
    @="URL:vnc Protocol"
    "URL Protocol"=""
    
    [HKEY_CLASSES_ROOT\vnc\shell\open\command]
    @="cmd /V:ON /C set address=%1 && set address=!address:~6,-2! && start /d \"C:\\Program Files\\uvnc bvba\\UltraVNC\\\" vncviewer.exe -connect !address!-notoolbar -nostatus -noauto"