If you have access to the PDQ Deploy Package Library you can use our pre-built package for silently installing TightVNC to all of your Windows computers. If you’d like to build your own TightVNC package you can follow the steps outlined below. In fact, building this package is an excellent exercise for learning how to build complex packages.
In this example we are only going to deploy the TightVNC “Server” portion. TightVNC is broken down into two components: Server and Viewer. There really is no need to deploy the Viewer to all of your computers unless you expect your end users to remotely control other computers. Since we only want the ability to initiate a remote control session against our target computers we will only need to install the Server portion.
Silently installing TightVNC: Building the Deployment Package
You will want to download the TightVNC Installers (64-bit and 32-bit depending on your targets). In this exercise we are using the .msi installer files. Copy these files to an appropriate location. In our example we are placing these files in our PDQ Deploy Repository folder.
Open PDQ Deploy and create a new package. Add the following steps. Please note that these steps won’t necessarily match the exact steps in our TightVNC package that is available in the Package Library.
1) Create a Command step. This step contains one line. It stops any existing TightVNC Service.
Set the Success Codes to 0,2 (Error code two is returned if the services doesn’t exist or is already started). You want to count these occurrences as a success.Under the Options tab set the Error Mode to Continue.
2) Create a Command step. This will uninstall old TightVNC that wasn’t installed with an MSI. This is important so that you don’t have two versions of TightVNC installed. The MSI will upgrade existing TightVNC installations that were also installed via MSI. Type in the command below into the Command field of the Details tab.
Go to the Conditions tab. Expand the File condition. Click the Exists radio button. In the directory field type in %ProgramFiles%\TightVNC and in the Filename field enter unins000.exe. By doing this you are ensuring that you only will run this step if the unins000.exe file is found in the designated directory.
3) Create a Command Step. This step will be identical to Step 2 except we are going to account for previous 32-bit TightVNC installations (non-MSI) that were installed on 64-bit targets. You will need to use the following command:
Also, make sure to add the file condition like you did in Step 2 but use the %ProgramFiles(x86)% variable instead. Also, in the Conditions tab change the O/S Architecture to 64-bit. The images below show the contents of the Details and Conditions tabs.
Add Install Files
4) Create an Install step. In this step we run the 32-bit installer on 32-bit systems only. In the Install File field navigate to the 32-bit TightVNC MSI file.
Now, the parameters are extremely important for this step. You need to determine which parameters are important to your environment. I will provide the basics but you may want to tweak these a little. You can find the available parameters in the documentation. Below are the parameters we provide with our TightVNC package.
Notice that we are setting the password value. You will want to pass this HOWEVER we have seen some instances where this value is not honored. We get around this in a later step by running a PowerShell script that forces the password change on the target. In this example we are setting the password to the word “helpdesk” without quotes. Please note that TightVNC passwords can only have up to eight characters. More appropriately, only the first eight characters of a provided password will be used. In the Conditions tab set the O/S Architecture to 32-bit.
5) Create an Install step for 64-bit targets. Use the same parameters supplied in the previous step. Just change the O/S Architecture condition to 64-bit and, obviously, change the Install File to the 64-bit installer.
Finishing TightVNC setup
6) We recommend placing a Sleep step here. The Sleep step is used when you want to pause a deployment for a certain number of seconds. Don’t go too crazy, 5 seconds should be enough.
7) Stop the TightVNC Service. A simple Command step can be used. Just run the following command:
Don’t forget to set the Success Codes to 0,2.
8) Install DFMirage Driver (OPTIONAL) – If you want to deploy the mirage driver to your computers then this would be a good time to do it. Create an Install Step. You can grab the install from the TightVNC download link mentioned before Step 1. Just a few notes. Make sure you don’t install the driver more than once on a target. We will show you how to prevent this. Also, according to the documentation the driver is compatible on OSes from XP – Windows 7. As a result we recommend using the O/S condition on this Install Step. Only include the appropriate OSes.
Please note on the Conditions tab that we (in addition to excluding later OSes) also have a File condition. We simply look for the file unins000.exe in the path %PROGRAMFILES%\DemoForge\Mirage Driver for TightVNC. Check the Does Not Exist radio button. This is one way you can prevent this step from installing the driver again.
The parameters we used to make the driver install silently are:
Here is a screenshot of the Details tab on the Install Step.
Here is the Conditions tab for the same step.
Setting the TightVNC password
9) Set TightVNC password. Create an Install Step. (You could also use a PowerShell step but we’ll just show you the Install Step method here). Kris Powell, our PowerShell rock star, wrote this script. We use this script because the password parameters in the install steps don’t consistently set the password for TightVNC. The parameters you will need to use for the script.
10) Create a Command Step. This step will simply start the TightVNC service. The following command should do the trick. Set the Success Codes to 0,1056,1058.
There you go. Don’t forget that you can initiate VNC remote control sessions from within PDQ Inventory.
Shane is the co-founder of PDQ.