Help launching VNC through Excel

Soldato
Joined
6 May 2009
Posts
20,325
I have an excel sheet with all our users. I would like to link VNC to this so i can click connect on a user and VNC is fired up

I have this code in excel

=HYPERLINK("C:\Program Files\RealVNC\VNC4\vncviewer.exe"&E47,"Connect")

In E47 I have the computer name '\\lds0013\'

When I press connect it says "cannot open the specified file"

What is the correct code that would fire up vnc with the correct ip address/computer name?


Thanks
 
I have a webpage I created for work it has 100 links on it to vnc computers
It works like this , I connect to a PC using vnc then save the .vnc file to disc
I tell it to save password as well ( its obfuscated)

I then tell windows to associate vnc files with vnc viewer , so now when someone clicks on a link it passes this file onto vnc viewer which then
starts up and connects to the computer.
Each of these links points to a .vnc file that has the computer name and password embedded on it.

I hope this helps
 
When i direct it to 192.168.10.91 thats in a cell, it says the same thing "cannot open the specified file"

So i have

=HYPERLINK("C:\Program Files\RealVNC\VNC4\vncviewer.exe"&D29,"Connect")

and in D29 have - 192.168.10.91
 
Try my method I know for a fact it works with ultravnc

example contents of vnc file , examplepc.vnc
host is set to the ip or name of the PC , password is encrypted BUT if you use same password for all , you can just copy paste the rest and change only the host part.


[connection]
host=PCNAMEHERE
port=5900
proxyhost=
proxyport=5900
password=a70a47b387cce22e
[options]
use_encoding_0=1
use_encoding_1=1
use_encoding_2=1
use_encoding_3=0
use_encoding_4=1
use_encoding_5=1
use_encoding_6=1
use_encoding_7=1
use_encoding_8=1
use_encoding_9=1
use_encoding_10=0
use_encoding_11=0
use_encoding_12=0
use_encoding_13=0
use_encoding_14=0
use_encoding_15=0
use_encoding_16=1
preferred_encoding=5
restricted=0
viewonly=0
nostatus=0
nohotkeys=0
showtoolbar=1
AutoScaling=0
fullscreen=0
autoDetect=0
8bit=0
shared=1
swapmouse=0
belldeiconify=0
emulate3=1
emulate3timeout=100
emulate3fuzz=4
disableclipboard=0
localcursor=1
Scaling=1
scale_num=1
scale_den=1
cursorshape=0
noremotecursor=1
compresslevel=6
quality=6
ServerScale=1
EnableCache=0
QuickOption=2
UseDSMPlugin=0
UseProxy=0
DSMPlugin=



PS
Another thought , have you tried running process explorer and checking to see what parameters are being passed to vncviewer.exe (double click the exe in the process list and check the command line - just incase something is being mangled by excel)
 
Last edited:
You are missing a space. The concatenation that it tries to execute becomes:

C:\Program Files\RealVNC\VNC4\vncviewer.exe\\lds0013\

Make it this:

=HYPERLINK("C:\Program Files\RealVNC\VNC4\vncviewer.exe "&E47,"Connect")

Additionally, as other's have mentioned, you probably don't need the slashes just "lds0013".
 
derkaderka - where does all that code go in? Saved as a .vnc file or in excel? I am trying to get it working through excel.

MPKeates - I tried with a space and changed \\lds0013\ to just lds0013. However it still says the same thing
 
save it in a text file with a .vnc extension (ultravnc viewer will run if u double click on the vnc file , if u have it installed)

You now just link to that file from your excel sheet
 
I think this may be a hyperlink limitation. A standard hyperlink on a HTML page has the same limitation with regards to parameters on executables.

The alternative is to create a VBA macro that is more or less the same. The code is very simple:

Shell ("C:\Program Files\RealVNC\VNC4\vncviewer.exe " & Range("E47"))

You can call the macro from whatever you like and it will launch the VNC connection correctly.
 
Just realised some of the passwords are different and are also on the excel sheet i am using.

The following code works fine and launches VNC but it obviously isnt liking the part where it gets the ip address (or computer name)

=HYPERLINK("C:\Program Files\RealVNC\VNC4\vncviewer.exe")

Every time i open the excel sheet i would have to trust the macro. Think it would be easier to just do what i do now and open the sheet (network users) then find the user with their IP and password, fire up VNC and get in.

I just though it might be quite easy to have a link to open vnc for a particular user within the same sheet
 
View > Toolbars > Control Toolbox

Click the standard button and "draw" it in to the spreadsheet. Right click > View Code > Paste the code in - done! :)
 
Back
Top Bottom