Difference between revisions of "UltraVNC"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
m
(Package for UltraVNC 1.1.8 x86/x64)
 
(11 intermediate revisions by 7 users not shown)
Line 9: Line 9:
 
Downloads can be done from the [http://www.uvnc.com/ UltraVNC website].
 
Downloads can be done from the [http://www.uvnc.com/ UltraVNC website].
  
== Package for UltraVNC 1.0.6.4 ==
+
== Package for UltraVNC 1.1.8 x86/x64 ==
 +
This is a modification of the 1.1.7 example below.  In theory, this should work on XP/Vista/Win7 32-bit and 64-bit architectures, but it's only been tested on WinXP x86 and Win7 x64 so far.
  
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 workIt'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.
+
This version will also set your (pre-encoded) password in ultravnc.ini using "replacetext.vbs", which can be found [[http://www.howtogeek.com/51194/replace-text-in-plain-text-files-from-the-command-line/ here]].  Note that I've set the %VNC_PASSWORD% variable in the profiles/userprofile.xml for security reasons, but you can create a variable directly in the package definition. 
 +
 
 +
You need four setup files: UltraVNC_1_1_8_x64_Setup.exe, UltraVNC_1_1_8_x64_Addon.exe, UltraVNC_1_1_8_x86_Setup.exe and UltraVNC_1_1_8_x86_Addon.exe.
 +
 
 +
You also need to create two .inf files for unattended installation - one for the main installer, one for the addons installer. Run both the main installer and the addons installer from the command line using the argument "/saveinf=filename". Customize your installation as you like, and the .inf file will record your preferences.  You should be able to use the same .inf files for both x86 and x64 installations.  Save both .inf files in your install directory.
 +
 
 +
Once UltraVNC is installed, configure it however you like, then copy the %PROGRAMFILES%\uvnc bvba\UltraVNC\ultravnc.ini file to your install directory.  If you want to set your password via replacetext.vbs, replace the password with the value "CHANGEME".
 +
 
 +
For the mirror Driver you need three Windows files: devcon.exe (x64 and x86 version) and certmgr.exe. You can find these via Google. To get rid of the certificate warning from Windows 7 during the driver Installation we need the .cer file.
 +
 
 +
You can extract it after installing the driver ona  test machine. Right click on the file %PROGRAMFILES%\uvnc bvba\UltraVNC\driver\driver\mv2.cat -> properties -> digital signature -> Details -> View Certificate -> Details ->Copy to File and export the DER-formatted .cer file.
 +
After the Installation I had the problem that the driver wasn´t recognized by the System. So i manually had to update it with the devcon.exe.
 +
 
 +
In the end there should be two Setup.exe, two addon.exe, two .inf files, two .cer files, certmgr.exe and two versions of devcon.exe in your setup folder.  
  
Because of the issues with the video driver, I have commented out the installation bits. They are included here for completeness sake.
 
 
<source lang="xml">
 
<source lang="xml">
   <package id="UltraVNC" name="Ultra VNC" revision="1064" priority="0">
+
  <packages>
     <check type="uninstall" condition="exists" path="UltraVNC 1.0.6.4" />
+
   <package id="ultravnc" name="Ultra VNC" revision="118" priority="0">
     <!-- <check type="registry" condition="exists" path="HKLM\SYSTEM\CurrentControlSet\Services\mv2\Start" /> -->
+
     <variable name="INSTALLER_NAME" value="UltraVNC_1_1_8_x86_Setup.exe" />
 +
    <variable name="INSTALLER_NAME" value="UltraVNC_1_1_8_x64_Setup.exe" architecture="x64" />
 +
    <variable name="ADDONS_INSTALLER_NAME" value="UltraVNC_1_1_8_x86_Addons.exe" />
 +
    <variable name="ADDONS_INSTALLER_NAME" value="UltraVNC_1_1_8_x64_Addons.exe" architecture="x64" />
 +
 
 +
     <check type="uninstall" condition="versiongreaterorequal" path="UltraVnc" value="1.1.8" />
  
 
     <install cmd="net stop uvnc_service">
 
     <install cmd="net stop uvnc_service">
       <exit code="0" />
+
       <exit code="any" />
       <exit code="2" />
+
    </install>
 +
    <install cmd="sc delete uvnc_service">
 +
       <exit code="any" />
 
     </install>
 
     </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'>
+
  <install cmd='%SOFTWARE%\ultravnc\%INSTALLER_NAME% /verysilent /loadinf="%SOFTWARE%\ultravnc\setup.inf"' />
      <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' /> -->
+
     <install cmd='%comspec% /c copy /Y %SOFTWARE%\ultravnc\ultravnc.ini "%PROGRAMFILES%\uvnc bvba\UltraVNC"' />
    <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>
+
<!-- Set the password in ultravnc.ini.  Note that the %VNC_PASSWORD% variable is set in the profile. Then restart UltraVNC. -->
</source>
+
    <install cmd='cscript %SOFTWARE%\ultravnc\replacetext.vbs "%PROGRAMFILES%\uvnc bvba\UltraVNC\ultravnc.ini" CHANGEME %VNC_PASSWORD%' />
  
 +
    <install cmd='%comspec% /c mkdir "%PROGRAMFILES%\uvnc bvba\UltraVNC\driver"'>
 +
      <exit code="any" />
 +
    </install>
 +
    <install cmd='%SOFTWARE%\ultravnc\%ADDONS_INSTALLER_NAME% /verysilent /loadinf="%SOFTWARE%\ultravnc\addons.inf"' />
  
 +
    <install cmd='%comspec% /c %SOFTWARE%\ultravnc\certmgr.exe -add %SOFTWARE%\ultravnc\ultravnc_x86.cer -s -r localMachine trustedpublisher' />
 +
    <install cmd='%comspec% /c %SOFTWARE%\ultravnc\certmgr.exe -add %SOFTWARE%\ultravnc\ultravnc_x64.cer -s -r localMachine trustedpublisher' />
  
== Package for UltraVNC 1.0.5.3 ==
+
    <install cmd='"%SOFTWARE%\ultravnc\devcon_x86.exe" update "C:\Program Files\uvnc bvba\UltraVNC\driver\driver\mv2.inf" mv_hook_display_driver2' architecture="x86" >
 +
      <exit code="any" />
 +
    </install>
 +
    <install cmd='"%SOFTWARE%\ultravnc\devcon_x64.exe" update "%PROGRAMFILES%\uvnc bvba\UltraVNC\driver\driver\mv2.inf" mv_hook_display_driver2' architecture="x64" >
 +
      <exit code="any" />
 +
    </install>
  
A lot has changed since v1.0.2:
+
    <install cmd='"%PROGRAMFILES%\uvnc bvba\UltraVNC\driver\setupdrv.exe" installs' />
* The norestart-switch is no longer necessary for the installer, only for the un-installer.
+
    <install cmd='net stop uvnc_service' />
* "winvnc -installs" seems to start servicehelper too.
+
    <install cmd='net start uvnc_service' />
* The mirror driver is not installed together with UltraVNC automaticaly. This package example however also also installs/uninstalls it but it can also be put into a seperate package if you want.
+
* UltraVNC settings are no longer saved into the registry but in a seperate ultravnc.ini file. So you will have to create that ini file with an existing installation (maybe the one resulting from generating the setup inf file (by using the /saveinf=filename.inf switch)) and copy it into your software directory.
+
This example automatically copies rc4.key for encryption and MSLogonACL for MSLogon.
+
  
<source lang="xml">
+
    <upgrade include="install"/>
<package
+
    id="ultravnc"
+
    name="Ultra VNC"
+
    revision="1053"
+
    priority="45">
+
  
  <check type="uninstall" condition="exists" path="UltraVNC 1.0.5.3" />
+
    <remove cmd='net stop uvnc_service'>
  <!-- Test for mirror driver -->
+
      <exit code='0' />
  <check type="registry" condition="exists" path="HKLM\SYSTEM\CurrentControlSet\Services\mv2\Start" />
+
      <exit code='2' />
+
    </remove>
  <install cmd='net stop uvnc_service'>
+
    <remove cmd='sc delete uvnc_service' />
    <exit code="0" />
+
    <remove cmd='"C:\Program Files\uvnc bvba\UltraVNC\unins000.exe" /verysilent /norestart' />
    <exit code='2' />
+
    <remove cmd='%comspec% /c rmdir /S /Q "C:\Program Files\uvnc bvba"' />
  </install>
+
  </package>
  <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>
 
 
</source>
 
</source>
  
== Package for UltraVNC 1.0.2 ==
+
== Package for UltraVNC 1.1.7 x64 ==
  
<source lang="xml">
+
This builds slightly on the example from 1.0.6.4 and was tested with Windows 7 x64 Clients.  
<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>
+
</source>
+
  
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).
+
You need UltraVNC_1_1_7_x64_Setup.exe and UltraVNC_1_1_7_x64_Addon.exe and create two install files (installer.exe /saveinf=file for both Setup and Addon).  
 +
For the mirror Driver you need two Windows files certmgr.exe and devcon.exe (x64 Version) which you can find via Google. To get rid of the certificate warning from Windows 7 during the driver Installation we need the .cer file. Extract it from the setupdrv.exe (Right click on the file %PROGRAMFILES%\uvnc bvba\UltraVNC\driver\driver\mv2.cat -> properties -> digital signature -> Details -> View Certificate -> Details ->Copy to File). After the Installation I had the problem that the driver wasn´t recognized by the System. So i manually had to update it with the devcon.exe.  
  
There is a problem with installation of UltraVNC Mirror Driver on some computers - installation freezes.
+
In the end there should be the Setup.exe, addon.exe, both .inf files, .cert file, certmgt.exe and devcon.exe in your setupfolder.
  
 +
<source lang="xml">
 +
  <package id="ultravnc" name="Ultra VNC" revision="%version%" priority="0">
  
 +
    <variable name="version" value="1.1.7" />
  
== UltraVNC 1.0.2 Mirror Driver ==
+
    <check type="uninstall" condition="versiongreaterorequal" path="UltraVnc" value="%version%" />
  
The mirror driver is included in the regular installer. It does not need to be installed separately.
+
      <install cmd="net stop uvnc_service">
 +
      <exit code="any" />
 +
    </install>
 +
    <install cmd="sc delete uvnc_service">
 +
      <exit code="any" />
 +
    </install>
 +
    <install cmd='%SOFTWARE%\ultravnc\UltraVNC_1_1_7_x64_Setup.exe /verysilent /loadinf="%SOFTWARE%\ultravnc\setup.inf"' />
 +
    <install cmd='%comspec% /c mkdir "C:\Program Files\uvnc bvba\UltraVNC\driver"'>
 +
      <exit code="any" />
 +
    </install>
 +
    <install cmd='%SOFTWARE%\ultravnc\UltraVNC_1_1_7_x64_Addons.exe /verysilent /loadinf="%SOFTWARE%\ultravnc\addons.inf"' />
  
 +
    <install cmd='%comspec% /c %SOFTWARE%\ultravnc\certmgr.exe -add %SOFTWARE%\ultravnc\ultravnc.cer -s -r localMachine trustedpublisher' />
 +
   
 +
    <install cmd='"C:\Program Files\uvnc bvba\UltraVNC\driver\setupdrv.exe" install' />
 +
    <install cmd='"%SOFTWARE%\ultravnc\devcon.exe" update "C:\Program Files\uvnc bvba\UltraVNC\driver\driver\mv2.inf" mv_hook_display_driver2' >
 +
      <exit code="any" />
 +
    </install>
  
 +
    <install cmd='%comspec% /c copy /Y %SOFTWARE%\ultravnc\ultravnc.ini "C:\Program Files\uvnc bvba\UltraVNC"' />
 +
 +
    <upgrade include="install"/>
  
== UltraVNC 1.0.2 Alternative installation ==
+
    <remove cmd='net stop uvnc_service'>
 
+
      <exit code='0' />
I couldn't install it with the UltraVNC installer on some machines - it was hanging all the time.
+
      <exit code='2' />
 
+
    </remove>
Here's a batch script which:
+
    <remove cmd='sc delete uvnc_service' />
* copies UltraVNC directory to %PROGRAMFILES% (available in UltraVNC-102-Bin.zip)
+
    <remove cmd='"C:\Program Files\uvnc bvba\UltraVNC\unins000.exe" /verysilent /norestart' />
* removes the service - if you had any other VNC servers installed in the past, this step might be helpful to avoid potential conflicts
+
    <remove cmd='%comspec% /c rmdir /S /Q "C:\Program Files\uvnc bvba"' />
* adds the service
+
* adds registry entries - after configuring the server (password, access etc., copy \\HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3\)
+
  </package>
* starts the service
+
* uses "echo" to exit with code 0
+
 
+
<source lang="dos">
+
%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
+
 
</source>
 
</source>
 
  
 
== Windows Firewall ==
 
== Windows Firewall ==
 +
 +
[Note: This may not be necessary as of UltraVNC 1.1.8.]
  
 
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:
 
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:

Latest revision as of 08:40, 25 February 2014

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.

Package for UltraVNC 1.1.8 x86/x64

This is a modification of the 1.1.7 example below. In theory, this should work on XP/Vista/Win7 32-bit and 64-bit architectures, but it's only been tested on WinXP x86 and Win7 x64 so far.

This version will also set your (pre-encoded) password in ultravnc.ini using "replacetext.vbs", which can be found [here]. Note that I've set the %VNC_PASSWORD% variable in the profiles/userprofile.xml for security reasons, but you can create a variable directly in the package definition.

You need four setup files: UltraVNC_1_1_8_x64_Setup.exe, UltraVNC_1_1_8_x64_Addon.exe, UltraVNC_1_1_8_x86_Setup.exe and UltraVNC_1_1_8_x86_Addon.exe.

You also need to create two .inf files for unattended installation - one for the main installer, one for the addons installer. Run both the main installer and the addons installer from the command line using the argument "/saveinf=filename". Customize your installation as you like, and the .inf file will record your preferences. You should be able to use the same .inf files for both x86 and x64 installations. Save both .inf files in your install directory.

Once UltraVNC is installed, configure it however you like, then copy the %PROGRAMFILES%\uvnc bvba\UltraVNC\ultravnc.ini file to your install directory. If you want to set your password via replacetext.vbs, replace the password with the value "CHANGEME".

For the mirror Driver you need three Windows files: devcon.exe (x64 and x86 version) and certmgr.exe. You can find these via Google. To get rid of the certificate warning from Windows 7 during the driver Installation we need the .cer file.

You can extract it after installing the driver ona test machine. Right click on the file %PROGRAMFILES%\uvnc bvba\UltraVNC\driver\driver\mv2.cat -> properties -> digital signature -> Details -> View Certificate -> Details ->Copy to File and export the DER-formatted .cer file. After the Installation I had the problem that the driver wasn´t recognized by the System. So i manually had to update it with the devcon.exe.

In the end there should be two Setup.exe, two addon.exe, two .inf files, two .cer files, certmgr.exe and two versions of devcon.exe in your setup folder.

  <packages>
  <package id="ultravnc" name="Ultra VNC" revision="118" priority="0">
    <variable name="INSTALLER_NAME" value="UltraVNC_1_1_8_x86_Setup.exe" />
    <variable name="INSTALLER_NAME" value="UltraVNC_1_1_8_x64_Setup.exe" architecture="x64" />
    <variable name="ADDONS_INSTALLER_NAME" value="UltraVNC_1_1_8_x86_Addons.exe" />
    <variable name="ADDONS_INSTALLER_NAME" value="UltraVNC_1_1_8_x64_Addons.exe" architecture="x64" />

    <check type="uninstall" condition="versiongreaterorequal" path="UltraVnc" value="1.1.8" />

    <install cmd="net stop uvnc_service">
      <exit code="any" />
    </install>
    <install cmd="sc delete uvnc_service">
      <exit code="any" />
    </install>

   <install cmd='%SOFTWARE%\ultravnc\%INSTALLER_NAME% /verysilent /loadinf="%SOFTWARE%\ultravnc\setup.inf"' />

    <install cmd='%comspec% /c copy /Y %SOFTWARE%\ultravnc\ultravnc.ini "%PROGRAMFILES%\uvnc bvba\UltraVNC"' />

<!-- Set the password in ultravnc.ini.  Note that the %VNC_PASSWORD% variable is set in the profile. Then restart UltraVNC. -->
    <install cmd='cscript %SOFTWARE%\ultravnc\replacetext.vbs "%PROGRAMFILES%\uvnc bvba\UltraVNC\ultravnc.ini" CHANGEME %VNC_PASSWORD%' />

    <install cmd='%comspec% /c mkdir "%PROGRAMFILES%\uvnc bvba\UltraVNC\driver"'>
      <exit code="any" />
    </install>
    <install cmd='%SOFTWARE%\ultravnc\%ADDONS_INSTALLER_NAME% /verysilent /loadinf="%SOFTWARE%\ultravnc\addons.inf"' />

    <install cmd='%comspec% /c %SOFTWARE%\ultravnc\certmgr.exe -add %SOFTWARE%\ultravnc\ultravnc_x86.cer -s -r localMachine trustedpublisher' />
    <install cmd='%comspec% /c %SOFTWARE%\ultravnc\certmgr.exe -add %SOFTWARE%\ultravnc\ultravnc_x64.cer -s -r localMachine trustedpublisher' />

    <install cmd='"%SOFTWARE%\ultravnc\devcon_x86.exe" update "C:\Program Files\uvnc bvba\UltraVNC\driver\driver\mv2.inf" mv_hook_display_driver2' architecture="x86" >
      <exit code="any" />
    </install>
    <install cmd='"%SOFTWARE%\ultravnc\devcon_x64.exe" update "%PROGRAMFILES%\uvnc bvba\UltraVNC\driver\driver\mv2.inf" mv_hook_display_driver2' architecture="x64" >
      <exit code="any" />
    </install>

    <install cmd='"%PROGRAMFILES%\uvnc bvba\UltraVNC\driver\setupdrv.exe" installs' />
    <install cmd='net stop uvnc_service' />
    <install cmd='net start uvnc_service' />

    <upgrade include="install"/>

    <remove cmd='net stop uvnc_service'>
      <exit code='0' />
      <exit code='2' />
    </remove>
    <remove cmd='sc delete uvnc_service' />
    <remove cmd='"C:\Program Files\uvnc bvba\UltraVNC\unins000.exe" /verysilent /norestart' />
    <remove cmd='%comspec% /c rmdir /S /Q "C:\Program Files\uvnc bvba"' />
  </package>

Package for UltraVNC 1.1.7 x64

This builds slightly on the example from 1.0.6.4 and was tested with Windows 7 x64 Clients.

You need UltraVNC_1_1_7_x64_Setup.exe and UltraVNC_1_1_7_x64_Addon.exe and create two install files (installer.exe /saveinf=file for both Setup and Addon). For the mirror Driver you need two Windows files certmgr.exe and devcon.exe (x64 Version) which you can find via Google. To get rid of the certificate warning from Windows 7 during the driver Installation we need the .cer file. Extract it from the setupdrv.exe (Right click on the file %PROGRAMFILES%\uvnc bvba\UltraVNC\driver\driver\mv2.cat -> properties -> digital signature -> Details -> View Certificate -> Details ->Copy to File). After the Installation I had the problem that the driver wasn´t recognized by the System. So i manually had to update it with the devcon.exe.

In the end there should be the Setup.exe, addon.exe, both .inf files, .cert file, certmgt.exe and devcon.exe in your setupfolder.

  <package id="ultravnc" name="Ultra VNC" revision="%version%" priority="0">

    <variable name="version" value="1.1.7" />

    <check type="uninstall" condition="versiongreaterorequal" path="UltraVnc" value="%version%" />

      <install cmd="net stop uvnc_service">
      <exit code="any" />
    </install>
    <install cmd="sc delete uvnc_service">
      <exit code="any" />
    </install>
    <install cmd='%SOFTWARE%\ultravnc\UltraVNC_1_1_7_x64_Setup.exe /verysilent /loadinf="%SOFTWARE%\ultravnc\setup.inf"' />
    <install cmd='%comspec% /c mkdir "C:\Program Files\uvnc bvba\UltraVNC\driver"'> 
      <exit code="any" />
    </install>
    <install cmd='%SOFTWARE%\ultravnc\UltraVNC_1_1_7_x64_Addons.exe /verysilent /loadinf="%SOFTWARE%\ultravnc\addons.inf"' />

    <install cmd='%comspec% /c %SOFTWARE%\ultravnc\certmgr.exe -add %SOFTWARE%\ultravnc\ultravnc.cer -s -r localMachine trustedpublisher' />
    
    <install cmd='"C:\Program Files\uvnc bvba\UltraVNC\driver\setupdrv.exe" install' />
    <install cmd='"%SOFTWARE%\ultravnc\devcon.exe" update "C:\Program Files\uvnc bvba\UltraVNC\driver\driver\mv2.inf" mv_hook_display_driver2' >
      <exit code="any" />
    </install>

    <install cmd='%comspec% /c copy /Y %SOFTWARE%\ultravnc\ultravnc.ini "C:\Program Files\uvnc bvba\UltraVNC"' />
 
    <upgrade include="install"/>	

    <remove cmd='net stop uvnc_service'>
      <exit code='0' />
      <exit code='2' />
    </remove>
    <remove cmd='sc delete uvnc_service' />
    <remove cmd='"C:\Program Files\uvnc bvba\UltraVNC\unins000.exe" /verysilent /norestart' />
    <remove cmd='%comspec% /c rmdir /S /Q "C:\Program Files\uvnc bvba"' />
 
  </package>

Windows Firewall

[Note: This may not be necessary as of UltraVNC 1.1.8.]

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