vncviewer: Invalid VNC server specified error when manually associating .vnc files

vncviewer: Invalid VNC server specified error when manually associating .vnc files

When not installing UltraVNC, but rather simply extracting vncviewer and associating it with .vnc file extensions, the process does not work correctly. Windows adds bad (default) options for opening files.

The message you get reads „Invalid VNC server specified error“, whereafter vncviewer tries connecting to any strange server.

What Windows does when associating auto-open commands

So Windows adds

1
2
3
4
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\vnc_auto_file\shell\open\command]
@="\"C:\\Tool\\vnc\\vncviewer.exe\" \"%1\""

, though the config file can not be passed in directly, rather, one has to add the /config option to specify a config file.

Adapting to vncviewer command-line-options

Thus the entry should be

1
2
3
4
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\vnc_auto_file\shell\open\command]
@="\"C:\\Tool\\vnc\\vncviewer.exe\" /config \"%1\""

, there also is another key in the registry that then actually did work for me

1
2
3
4
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Applications\vncviewer.exe\shell\open\command]
@="\"C:\\Tool\\vnc\\vncviewer.exe\" /config \"%1\""

and can be changed e. g. through regedit. Those are .reg files though, so if you use regedit, please replace the \“ with “ and the \\ with \:

"C:\Tool\vnc\vncviewer.exe" /config "%1"

Note: a reboot might be required after changing that value, for me.. I think it was not necessary.

All’s well that ends well

Now, you can easily have a file-library of all the VNC-machines you want to connect to, including settings like auto-scale, and passwords, if you choose to do so. Pretty handy. Plus.. no installation required.. for all the poor souls not being allowed to do so e. g. at work.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.