Difference between revisions of "TightVNC"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
m (Sorry, wrong correction, reverted.)
(Corrected uninstall switches)
Line 19: Line 19:
 
                 <exit code="0" reboot="true" />
 
                 <exit code="0" reboot="true" />
 
         </upgrade>
 
         </upgrade>
         <remove cmd='%ProgramFiles%\TightVNC\unins000.exe /SP- /VERYSILENT' />
+
         <remove cmd='%ProgramFiles%\TightVNC\unins000.exe /silent' />
 
  </package>
 
  </package>
 
   
 
   

Revision as of 18:49, 30 March 2007

I prefer TightVNC over UltraVNC, essentially because they have viewers also for other operating systems and I'm not stuck on browser/java viewer under my preferred OS.

I install and manage TightVNC with the following XML package description:

<package
       id="tightvnc"
       name="TightVNC server"
       revision="129"
       priority="50"
       reboot="false">

       <check type="uninstall" condition="exists" path="TightVNC 1.2.9" />

       <install cmd="%SOFTWARE%\WPKG\tightvnc-1.2.9-setup.exe /sp- /verysilent"  />
       <install cmd="%ProgramFiles%\TightVNC\WinVNC.exe -reinstall" />
       <install cmd="%ProgramFiles%\TightVNC\WinVNC.exe -servicehelper" />
       <install cmd='netsh firewall add allowedprogram program = %ProgramFiles%\TightVNC\WinVNC.exe name = "Launch TightVNC Server"' />
       <upgrade cmd='%SOFTWARE%\WPKG\tightvnc-1.2.9-setup.exe /sp- /verysilent' >
               <exit code="0" reboot="true" />
       </upgrade>
       <remove cmd='%ProgramFiles%\TightVNC\unins000.exe /silent' />
</package>

<package
       id="tightvnc-settings"
       name="TightVNC server settings"
       revision="3"
       priority="5"
       reboot="false"
       execute="once">
       <depends package-id="tightvnc"/>

       <install cmd="%WPKGROOT%\packages\tightvnc.bat" />
       <upgrade cmd="%WPKGROOT%\packages\tightvnc.bat" />
       <remove cmd='echo "nothing"' />
</package>

TightVNC is a simple batch script that setup TightVNC server and restart it:

:: start, restart or apply settings to tightvnc
::
net stop "VNC Server"
regedit /s %WPKGROOT%\packages\tightvnc.reg
net start "VNC Server"

:: For some unknown reason the servicehelper does not restart.
::
%ProgramFiles%\TightVNC\WinVNC.exe -servicehelper
:: we ignore errors...
::
exit 0

tightvnc.reg contains the setup of the server, most notably the access password, i.e. I can use as a registry patch:

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3\Default]
"Password"=hex:11,22,33,44,55,66,77,88
"PasswordViewOnly"=hex:99,aa,bb,cc,dd,ee,ff,00

NOTE that passwords are crypted, but this is no a paranoid setup, someone can easily have access to the registry patch and try to decrypt the password.