UltraVNC

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

UltraVNC is one example of a VNC Server and Client, a standard means of remote access.

Running VNC server software on Windows allows you to connect to the Windows graphical environment using VNC client software on a remote computer. There are various VNC client and server softwares, such as TightVNC and UltraVNC. There are VNC clients for probably every operating system, so you don't need to be running Windows to connect to and use Windows. VNC uses the RFB protocol, a defined standard method for remote access, so generally speaking any VNC client will connect to any VNC server, however occasionally some VNC implementations have added non-standard features that other clients may not support, examples of this are UltraVNC's remote login and file transfer features.

VNC clients connect into the session currently running on Windows, so the remote user and the person who might be sat at the computer see the same thing; the client doesn't get a separate login prompt, if someone is already logged into the computer then you see that, otherwise you get to login.

For remote administration or remote staff working, for security reasons you are strongly advised not to enable remote access to desktop computers directly over the Internet, instead you should have a firewall in place (for example pfSense), running a VPN server, which clients are required to securely VPN into before they have unfettered access to connect to VNC on desktop computers running Windows (or other operating systems).

Downloads can be done from the UltraVNC website.

Contents

[edit] Package for UltraVNC 1.0.6.4

This builds on the example from 1.0.5.3, with the notable addition of the extra work to install the video driver. The bad news is that the video driver doesn't work unless the client option "WPKG User Interface Show" checkbox is checked. The good news is that if that's checked, the below will work. It's worth noting that the installation package no longer creates the 'driver' directory; this must now be done manually. You will have to setup your software repository with this directory. Further, the installer ocationally is unable to make the HKLM\Software\OLE directory, thus the ACL import will fail leaving your clients unable to authenticate. The acl.reg file is taken from a correctly setup host and imported in to the registry before the import. Technically redundant, but the installer is touchy so both are included.

Because of the issues with the video driver, I have commented out the installation bits. They are included here for completeness sake.

  <package id="UltraVNC" name="Ultra VNC" revision="1064" priority="0">
    <check type="uninstall" condition="exists" path="UltraVNC 1.0.6.4" />
    <!-- <check type="registry" condition="exists" path="HKLM\SYSTEM\CurrentControlSet\Services\mv2\Start" /> -->
 
    <install cmd="net stop uvnc_service">
      <exit code="0" />
      <exit code="2" />
    </install>
    <install cmd="sc delete uvnc_service" />
    <install cmd='\\sunpro\apps$\ultravnc\UltraVNC_1.0.6.4_Setup.exe /verysilent /loadinf="\\sunpro\apps$\ultravnc\UltraVNC_1.0.6.4_Setup.exe"' />
    <install cmd='%comspec% /c copy /Y \\sunpro\apps$\ultravnc\ultravnc.ini "%ProgramFiles%\UltraVNC\"' />
    <install cmd='%comspec% /c copy /Y \\sunpro\apps$\ultravnc\rc4.key "%ProgramFiles%\UltraVNC\"' />
    <!--    <install cmd='%comspec% /c mkdir "%ProgramFiles%\UltraVNC\driver"'> 
      <exit code="0" />
      <exit code="1" />
    </install> -->
    <!-- <install cmd='%comspec% /c xcopy /Q /Y /S \\sunpro\apps$\ultravnc\driver "%ProgramFiles%\UltraVNC\driver\"' /> -->
    <install cmd='regedit /s "%SOFTWARE%\ultravnc\acls.reg"' />
    <install cmd='"%ProgramFiles%\UltraVNC\MSLogonACL.exe" /i /a \\sunpro\apps$\ultravnc\acls.txt' />
    <!-- <install cmd='%comspec% /c start /WAIT "Mirror Driver Install" /D"%ProgramFiles%\UltraVNC\driver\XP" "%ProgramFiles%\UltraVNC\driver\XP\setupdrv.exe" install' /> -->
    <install cmd='"%ProgramFiles%\UltraVNC\winvnc.exe" -installs' />
 
    <upgrade cmd='net stop uvnc_service'>
      <exit code='0' />
      <exit code='2' />
    </upgrade>
    <upgrade cmd='sc delete uvnc_service' />
    <upgrade cmd='\\sunpro\apps$\ultravnc\UltraVNC_1.0.6.4_Setup.exe /verysilent /loadinf="\\sunpro\apps$\ultravnc\UltraVNC_1.0.6.4_Setup.exe"' />
    <upgrade cmd='%comspec% /c copy /Y \\sunpro\apps$\ultravnc\ultravnc.ini "%ProgramFiles%\UltraVNC\"' />
    <upgrade cmd='%comspec% /c copy /Y \\sunpro\apps$\ultravnc\rc4.key "%ProgramFiles%\UltraVNC\"' />
    <!-- <upgrade cmd='%comspec% /c mkdir "%ProgramFiles%\UltraVNC\driver"'> 
      <exit code="0" />
      <exit code="1" />
    </upgrade> -->
    <!-- <upgrade cmd='%comspec% /c xcopy /Q /Y /S \\sunpro\apps$\ultravnc\driver "%ProgramFiles%\UltraVNC\driver\"' /> -->
    <upgrade cmd='"%ProgramFiles%\UltraVNC\MSLogonACL.exe" /i /a \\sunpro\apps$\ultravnc\acls.txt' />
    <!-- <upgrade cmd='%comspec% /c start /WAIT "Mirror Driver Install" /D"%ProgramFiles%\UltraVNC\XP" "%ProgramFiles%\UltraVNC\driver\XP\setupdrv.exe" install' /> -->
    <upgrade cmd='"%ProgramFiles%\UltraVNC\winvnc.exe" -installs' />
 
    <!-- <remove cmd='%comspec% /c start /WAIT "Mirror Driver Uninstall" /D"%ProgramFiles%\UltraVNC\driver\XP" "%ProgramFiles%\UltraVNC\driver\XP\setupdrv.exe" uninstall' /> -->
    <remove cmd='net stop uvnc_service'>
      <exit code='0' />
      <exit code='2' />
    </remove>
    <remove cmd='sc delete uvnc_service' />
    <!-- <remove cmd='sc delete mv2' /> -->
    <remove cmd='"%ProgramFiles%\UltraVNC\unins000.exe" /verysilent /norestart' />
    <remove cmd='%comspec% /c rmdir /S /Q "%programfiles%\UltraVNC"' />
 
  </package>


[edit] Package for UltraVNC 1.0.5.3

A lot has changed since v1.0.2:

This example automatically copies rc4.key for encryption and MSLogonACL for MSLogon.

 <package 
    id="ultravnc" 
    name="Ultra VNC" 
    revision="1053" 
    priority="45">
 
   <check type="uninstall" condition="exists" path="UltraVNC 1.0.5.3" />
   <!-- Test for mirror driver -->
   <check type="registry" condition="exists" path="HKLM\SYSTEM\CurrentControlSet\Services\mv2\Start" /> 
 
   <install cmd='net stop uvnc_service'>
     <exit code="0" />
     <exit code='2' />
   </install>
   <install cmd='sc delete uvnc_service' />
   <install cmd='%SOFTWARE%\UltraVNC\UltraVNC_1.0.5.3_Setup.exe /verysilent /loadinf="%SOFTWARE%\UltraVNC\ultravnc_server.inf"' /> 
   <install cmd='cmd /c copy /Y %SOFTWARE%\UltraVNC\ultravnc.ini "%PROGRAMFILES%\UltraVNC"' />
   <install cmd='cmd /c copy /Y %SOFTWARE%\UltraVNC\rc4.key "%PROGRAMFILES%\UltraVNC"' />
   <install cmd='"%PROGRAMFILES%\UltraVNC\MSLogonACL.exe" /i /a %SOFTWARE%\UltraVNC\MSLogonACL' />
   <install cmd='%comspec% /c start /WAIT "Mirror Driver Install" /D"%ProgramFiles%\UltraVNC\driver\XP" "%ProgramFiles%\UltraVNC\driver\XP\setupdrv.exe" install' />
   <install cmd='"%PROGRAMFILES%\UltraVNC\winvnc.exe" -installs' />
 
   <upgrade cmd='net stop uvnc_service'>
     <exit code="0" />
     <exit code='2' />
   </upgrade>
   <upgrade cmd='sc delete uvnc_service' />
   <upgrade cmd='cmd /c mkdir "%PROGRAMFILES%\UltraVNC"'>
     <exit code="0" />
     <exit code="1" />
   </upgrade>
   <upgrade cmd='sc delete uvnc_service' />
   <upgrade cmd='%SOFTWARE%\UltraVNC\UltraVNC_1.0.5.3_Setup.exe /verysilent /loadinf="%SOFTWARE%\UltraVNC\ultravnc_server.inf"' /> 
   <upgrade cmd='cmd /c copy /Y %SOFTWARE%\UltraVNC\ultravnc.ini "%PROGRAMFILES%\UltraVNC"' />
   <upgrade cmd='cmd /c copy /Y %SOFTWARE%\UltraVNC\rc4.key "%PROGRAMFILES%\UltraVNC"' />
   <upgrade cmd='"%PROGRAMFILES%\UltraVNC\MSLogonACL.exe" /i /a %SOFTWARE%\UltraVNC\MSLogonACL' />
   <upgrade cmd='%comspec% /c start /WAIT "Mirror Driver Install" /D"%ProgramFiles%\UltraVNC\driver\XP" "%ProgramFiles%\UltraVNC\driver\XP\setupdrv.exe" install' />
   <upgrade cmd='"%PROGRAMFILES%\UltraVNC\winvnc.exe" -installs' />
 
   <remove cmd='%comspec% /c start /WAIT "Mirror Driver Uninstall" /D"%ProgramFiles%\UltraVNC\driver\XP" "%ProgramFiles%\UltraVNC\driver\XP\setupdrv.exe" uninstall' />
   <remove cmd='net stop uvnc_service'>
     <exit code="0" />
     <exit code='2' />
   </remove>
   <remove cmd='sc delete uvnc_service' />
   <!-- Actually Delete mirror driver service as setupdrv doesn't seem to do that -->
   <remove cmd='sc delete mv2' />
   <remove cmd='%ProgramFiles%\UltraVNC\unins000.exe /verysilent /norestart' />
 </package>

[edit] Package for UltraVNC 1.0.2

<package
    id="ultravnc"
    name="Ultravnc 1.0.2"
    revision="1"
    reboot="false"
    priority="2">
 <check type="uninstall" condition="exists" path="UltraVNC v1.0.2" />
 <install cmd='%SOFTWARE%\UltraVNC-102-Setup.exe /verysilent /norestart /SP-' />
 <install cmd='%ProgramFiles%\UltraVNC\winvnc.exe -sinstall' />
 <install cmd='%ProgramFiles%\UltraVNC\winvnc.exe -servicehelper' />
 <upgrade cmd='%SOFTWARE%\UltraVNC-102-Setup.exe /verysilent /norestart /SP-' />
 <remove cmd='%ProgramFiles%\UltraVNC\winvnc.exe -remove' />
 <remove cmd='%ProgramFiles%\UltraVNC\unins000.exe /SILENT' />
</package>

Note that you can save changes to the defaults by saving an inf file during setup (by using the /saveinf=filename.inf switch), then retrieve them during deployment (using the /loadinf=filename.inf switch).

There is a problem with installation of UltraVNC Mirror Driver on some computers - installation freezes.


[edit] UltraVNC 1.0.2 Mirror Driver

The mirror driver is included in the regular installer. It does not need to be installed separately.


[edit] UltraVNC 1.0.2 Alternative installation

I couldn't install it with the UltraVNC installer on some machines - it was hanging all the time.

Here's a batch script which:

%SOFTWARE%\robocopy %SOFTWARE%\UltraVNC\UltraVNC C:\Programme\UltraVNC /MIR /W:3 /R:3 >nul
C:\Programme\UltraVNC\winvnc.exe -remove
C:\Programme\UltraVNC\winvnc.exe -sinstall
regedit /s %SOFTWARE%\UltraVNC\VNCHooks_Settings.reg
regedit /s %SOFTWARE%\UltraVNC\ultravnc.reg
net start WinVNC
echo


[edit] Windows Firewall

When installing silently the Windows Firewall won't prompt you to allow the VNC Server. You can script allowing traffic to the VNC server (on TCP port 5900, from all sources) using:

:: allow incoming TCP connections to port 5900 
netsh advfirewall firewall add rule name="VNC SERVER" dir=in protocol=TCP localport=5900 action=allow

old command (out-of-date)

netsh firewall add portopening TCP 5900 "VNC server" enable all
Retrieved from "http://wpkg.org/UltraVNC"
Personal tools
Namespaces
Variants
Actions
Navigation
ideas?
Toolbox