winvnc4 commandline sequence/syntax

Dave stoft "at" sbcglobal.net
Mon Dec 3 07:53:01 2007


D. Thanks; your description fits the symptoms.

Would have been nice if VNC4 had included this in the docs; maybe it's
a legacy 'feature'. I did wander the path of editing the registry and that
does look like the best alternative. I'd assumed I should be able to config
at the time of registering since the service would not yet be active. Now
I'll just add a few lines in the script to change the existing config in
the Win registry prior to VNC4 registration and start; that way it's all
nicely automated. I'm wanting to run only one server, but I want programatic
control over the config when it runs so I can dynamically alter the access
rights per session plus not leave the service always on. So, I need servic
mode which can run VNC4 when the system is locked and the user logged-out.

Thanks for your clear description.

Dave


>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).
>