Hi Dave,

I'm not on the RealVNC team or anything but have been working with VNC
on the command line for a little while now and have been looking through
the code [1].

It appears to me (correct me if I'm wrong, VNC guys) that there are two
ways to run VNC - service mode (with -start, -register, - unregister,
-stop, etc) and in user mode (where you can specify config parameters on
the command line) and never the twain shall meet. If you specify command
line parameters, they are only used when using VNC in user mode.

This is the impression I get from reading winvnc.cxx, line 102, static
void processParams() (RealVNC 4.1.2 src).

To set parameters for the service mode VNC you have to put them in the
registry, under HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC. The way I figured
this out was to install and configure VNC from the system tray, then
look in the registry to get the appropriate settings, then you can
create a .reg file with these settings and run that off the command line
(this may sound complicated but I had to use the command line for
everything, rather than invoking the code directly).

If there's a better way than this, let me know it. :o) Also, let me know
if I've got any of this wrong.

D. (Adelaide, South Australia)

[1] My issue is to try to run VNC as a service, but then to occasionally
run it from the commandline as well with different parameters (resulting
in two VNC servers running on the same machine on different ports with
different parameters).

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Stoft
Sent: Saturday, 1 December 2007 1:24 PM
To: vnc-list@realvnc.com
Subject: winvnc4 commandline sequence/syntax

I've been unable to find a clear reference for programatic start, config
and stop of a vnc4.3.2 server. My guess at the syntax and sequence does
not control the server settings that were created via the windows
interface.

- On Win2k or XP
- The VNC4.3.2 package installed correctly
- The server/viewer work when run as a background server that always
starts on boot and where the config is setup via the windows interface
- Assume all files are in the same working directory.
- My objective is to start and config the vnc server via a script so the
settings are dynamic.

> winvnc4.exe -register -vncconfigfile configfilename.vnc winvnc4.exe
> -start

or...

> winvnc4.exe -register Hosts=<ip addr> PortName=5900 <etc.> winvnc4.exe

> -start

In either case, the server is registered as a service and the -start
gets it running (and a >winvnc4.exe -stat shows this) but the config
settings (as found by Tray : RtClk : Options... show no effect to the
config settings either listing them in the command line or in a command
file. VNC gives no error. Deliberately messing with the syntax will
produce an error so the command-line options and switches are being
recognized.

> winvnc4.exe -stop
> winvnc4.exe -unregister

Both of these work w/o error.

> vncconfig.exe
This only runs the windows interface. It appears to ignore all command
line parms and switches.

What did I miss in understanding the syntax or usage?
If I had to re-set the config after starting the server, that's ok, but
I've not found a way to do that.

According to the VNC docs (though they do not show command line
examples) is that a command-line interface for config is available.

Thanks.

Dave
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

IMPORTANT: This email remains the property of the Australian Defence
Organisation and is subject to the jurisdiction of section 70 of the CRIMES
ACT 1914.  If you have received this email in error, you are requested to
contact the sender and delete the email.
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to