Celebrating the 22th anniversary of the UltraVNC: https://forum.uvnc.com/viewtopic.php?t=38031
Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Right mouse click opens computer with VNC Viewer

Post Reply
kaajee
Posts: 6
Joined: 2007-07-09 09:54

Right mouse click opens computer with VNC Viewer

Post by kaajee »

How can I achieve the following....(if possible at all :) )

I know VNCviewer supprts adding the/a workstation/client/computer name on the command prompt:

Code: Select all

vncviewer.exe computername
I would like to open the workgroup/domain in 'Network Neighborhood', then right click on one of the workstations/computers and have an extra option: 'Open with VNC Viewer...".
When selecting this option the VNCviewer should open with the computername already entered/'filled in' in the first dialog and only present the password dialog.....
(or maybe only woth the computername filled in, in case a custom listening port is configured, so that one can add only the proper display port).

I already have the option; "Open with VNC Viewer' added when right clicking the computer. I addes this option with a program called Context Edit v1.1. But openening with that computer not yet.....
I tried the parameter %1; not working.....

In 'common language' how can i get this to work; the choosen computername should be 'taken' into the vncviewer dialog box....
mattice06082
Former moderator
Former moderator
Posts: 607
Joined: 2006-11-30 00:41
Location: Connecticut, USA

Re: Right mouse click opens computer with VNC Viewer

Post by mattice06082 »

This seems like a ContextEdit problem as opposed to an UltraVNC problem. Are you able to use the commandline vncviewer shown in your code?

I've never used ContextEdit, but I took a look at the help and it seems like this should be possible. Is there any way to see what the "%1" argument holds when you right click on the machine you'd like to connect to? I'm thinking that it is potentially computername.lnk which would not work.
kaajee
Posts: 6
Joined: 2007-07-09 09:54

Re: Right mouse click opens computer with VNC Viewer

Post by kaajee »

Thx for the reaction.....
Forget about Context Edit, that's just a way to create an extra item when right clicking. It just adds an entry in te registry.
For testing, i put the entry in:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\
(C:\Program Files\UltraVNC\vncviewer.exe)

so that it appears on every right click on a folder.
Now i have an extra option: 'Open with VNC Viewer'
when just leaving it, so the command line is:

Code: Select all

C:\Program Files\UltraVNC\vncviewer.exe
Ultra Vnc Viewer presents it's standard dialog box, with the last used VNC server in the input box.

When 'hard' adding an existing vnc server into te registry, for example:

Code: Select all

C:\Program Files\UltraVNC\vncviewer.exe vnc_server_computer_name
It works, the vncviewer 'takes' vnc_server_computer_name and the password dialog box appears. But offcourse it now will always open with the same vncserver, being; 'vnc_server_computer_name'

When adding %1 to the rule (wich is kind of standard, see also here)

Code: Select all

C:\Program Files\UltraVNC\vncviewer.exe "%1"
, vncviewer is trying to connect to a (non existing) VNC server called " on port 5900, and this fails offcourse. It doesn't 'take' the computername. So it can't handle the %1 parameter i reckon.......
see:
Image
Last edited by kaajee on 2007-07-09 12:18, edited 2 times in total.
mattice06082
Former moderator
Former moderator
Posts: 607
Joined: 2006-11-30 00:41
Location: Connecticut, USA

Re: Right mouse click opens computer with VNC Viewer

Post by mattice06082 »

I understand what you're trying to do. vncviewer won't take %1 as a commandline argument. However, I created a batch file that I've called temp.bat which contains:

Code: Select all

vncviewer "%1"
and then called it from the commandline using temp 127.0.0.1 and all is well. So I think that it is a ContextEdit issue. You need to get ContextEdit to interpret the machine name and pass the machine name to the vncviewer call.
kaajee
Posts: 6
Joined: 2007-07-09 09:54

Re: Right mouse click opens computer with VNC Viewer

Post by kaajee »

mattice06082 wrote:I understand what you're trying to do. vncviewer won't take %1 as a commandline argument. However, I created a batch file that I've called temp.bat which contains:

Code: Select all

vncviewer "%1"
and then called it from the commandline using temp 127.0.0.1 and all is well. So I think that it is a ContextEdit issue. You need to get ContextEdit to interpret the machine name and pass the machine name to the vncviewer call.
Well then maybe it is not possible to 'take' the computername form the network neighborhood enviroment. And then it is not a Context Edit issue, but a Windows issue.....

I tried the following:
I alsoi get the 'Open with VNC Viewer' when right clicking a file.
I created a txt file with the text: 127.0.0.1.
Also named it: test.txt, test, 127.0.0.1.txt and 127.0.0.1 then right clicked it, VNC viewer starts, comes with the command line options info dialog 'Invalid VNC server specified' and then tries to open a session with no server name or ip address (= empty), but with port number 4011816 filled in........where does the 4011816 come from?

Normally in windows, when right clicking a file, the %1 'rule' takes care of the file being opened is opened with the choosen application.......
Apperantly Windows has given this option to files and folders but not to the computers in Network Neighboirhood. On the onther hand: some actions on these computers are already in the system, those are the standard actions:

Code: Select all

Open
Explore
-------
Map Network Drive (greyed out)
-------
Create Shortcut
-------
Properties
mattice06082
Former moderator
Former moderator
Posts: 607
Joined: 2006-11-30 00:41
Location: Connecticut, USA

Re: Right mouse click opens computer with VNC Viewer

Post by mattice06082 »

As an alternative, you could create a directory containing VNC-files with the names of each machine you can access. Then if the VNC-files are associated with the viewer you can simply open them to gain access to each machine. To create the VNC-files, right click on the vncviewer window after creating the connection and select Save connection info as .... Would that work for you?
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Right mouse click opens computer with VNC Viewer

Post by redge »

other alternativ,
vnc related products (some are free)
http://forum.ultravnc.info/viewforum.php?f=27
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
kaajee
Posts: 6
Joined: 2007-07-09 09:54

Re: Right mouse click opens computer with VNC Viewer

Post by kaajee »

mattice06082 wrote:As an alternative, you could create a directory containing VNC-files with the names of each machine you can access. Then if the VNC-files are associated with the viewer you can simply open them to gain access to each machine. To create the VNC-files, right click on the vncviewer window after creating the connection and select Save connection info as .... Would that work for you?
and:
redge wrote:other alternativ,
vnc related products (some are free)
http://forum.ultravnc.info/viewforum.php?f=27
Thanks and yes, i know about the alternatives, but i always look in 'network neighborhood' ('my networdk places') if the computer is (powered) 'on', then it seems so handy to just right click to 'take over' the pc.......and not have to open another program or start another/seperate procedure.

I tried quite a few already, but no one is giving me exactly what i want.....

I think i have to dig deeper into the whole right click context stuff. Maybe it's even too complex, see also here
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Right mouse click opens computer with VNC Viewer

Post by redge »

added to feature request list :-)

[topic=10539][/topic]
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
kaajee
Posts: 6
Joined: 2007-07-09 09:54

Re: Right mouse click opens computer with VNC Viewer

Post by kaajee »

redge wrote:added to feature request list :-)

[topic=10539][/topic]
Thanks, but as stated, i think it's a Windows problem and that the 'developers of vnc' can't do much about it........
I also reported this issue to someone who made a right click app and he responded:
It's seems that Windows does not report any file name info for network servers in case of static menu items.
Definitely, it should report something like "\\server" for computer named
"server".
I'll try to fix it for dynamic context menu items and let you know the results.
But who knows!
Last edited by kaajee on 2007-07-12 08:37, edited 1 time in total.
Post Reply