winvnc4 commandline sequence/syntax
Dave
stoft "at" sbcglobal.net
Fri Dec 7 09:16:01 2007
Thanks for everyone's contributions. I looked at the various
suggestions, claims and facts and
experimented a bit to discover the following:
1 - winvnc4.exe runs the same from any directory
2 - command-line execution of vncconfig.exe only applies to 'user' mode
not to 'service' mode
3 - only the rt-click : Options... will look at 'service' mode config data
4 - HKLM/Software/RealVNC/WinVNC4 lists 'service' config data
5 - HKU/<user_account>/Software/RealVNC/WinVNC4 lists 'user' config data
6 - HKLM/System/CurrentControlSet/Services/WinVNC4 has a field called
ImagePath which shows the command-line command that was entered.
Interesting I guess.
7 - The 'service' config info _can_ be changed directly via the registry
directives
8 - Changes to the registry, via HKLM, appear to be accepted at any time
and, if the
VNC icon access to config, via Options..., is to be believed, the
changes are live and
active immediately
9 - winvnc4.exe -register /-start / -stop / -unregister may not be
required in all cases, but
it appears to be a complete, reliable, repeatable sequence -- nice for
scripts. The
Win services list does show the VNC service as it should be.
So, I considered the simplified case of attempting to affect a single,
service-mode config
parameter. However, none of the following or their variants have any
affect on the the
Port Number parm when verified via the rt-click : Options... of the
service icon. In fact,
it appears that nothing except the -register command-line switch is
recognized.
None of these do anything except "register" the service; other
parameters are ignored.
The syntax listed by >winvnc4 -help is:
>winvnc4 -register <options...>
where <setting>=<value> is listed as the syntax for parameters
and PortNumber is listed as a parameter. Perhaps there is something else
missing from
the sequence for using winvnc4.exe?
>winvnc4 -register PortNumber=5977
>winvnc4 -register -portnumber=5977
>winvnc4 -register -portnumber 5977
>winvnc4 -register "PortNumber=5977"
>winvnc4 -portnumber=5977 -register
>winvnc4 -register -vncconfigfile config.vnc
>winvnc4 -register -vncconfigfile c:\...\config.vnc
>winvnc -portnumber=5977
...starts VNC in user mode, but also ignores the parameter
While I will write the scripts to modifying HKLM to configure the vnc4
service, I'd
expected something a bit more usable from the command line for VNC. However,
I would still find it instructive to know the root cause of these
symptoms and what
is required to utilize command-line options when establishing a vnc4
service.
Thanks to all.
Dave