Step 1 of 2: Extract the installer files
The first step is to extract the real installation files. The setup program is just a container for the these.
Go through these steps to get the real installation files:
- Go to www.teamviewer.com and click the download link.
- Run the setup program, but do not click "next", when the installation starts.
- Open Explorer and go to %temp%\TeamViewer, as shown below.
- There is most likely a subfolder named the version of TeamViewer, for example "Version8". Double-click this folder to change directory.
- Copy TeamViewer_.exe to a new working directory and close the installer.
The installation can now be executed passing /S (parameters are case sensitive) to the TeamViewer_.exe file. We can now either execute the installation unattended or
repackage it into MSI format for mass deployment through Group Policies or a management system like SCCM. We will go through both options below.
||Note that a /MSI switch also exists, which will nicely avoid the start of TeamViewer after successful installation.
This means that you can just use the /MSI switch and build an MSI file using the EXE-to-MSI wizard.
However, if you do not have the licensed version, this switch will install the trial version instead of the free one.
Step 2 of 2 - option 1: Deployment through Group Policies or a management system
To deploy TeamViewer with Group Policies, we need to repackage the installation into a Windows Installer
.msi file. FastTrack Automation Studio can package a script and installation files into an .msi file,
as explained here
. The installation script must basically just
run the installation unattended and kill the application. All we need is to start the
installation using the /S switch and kill TeamViewer after installation. A simple installation script to do so,
looks like the one below. The user will not see the application start, because
the KillProcess command will kill the application before it is visible.
However, we should always include an uninstallation in an MSI script, so we need to expand the script a bit.
Go to Advanced Mode, if you are in App Factory mode. Create a new script and either select "TeamViewer MSI" in the
"New Script" window or use the snippet below. Save the script in the same folder as your TeamViewer_.exe file.
If MSIInstallContext Then
Run "[ProgramUninstaller TeamViewer]" /S
The MSIInstallContext condition detects if the script is currently installing or uninstalling and the
ProgramUninstaller function asks the system for the uninstallation string for TeamViewer, which
will uninstall silently, when the /S parameter is passed to the uninstaller. Next click the MSI menu item or press F12.
Make sure that you have TeamViewer_.exe located in the same folder as the script file.
The MSI generation wizard will open, as shown below.
Make sure that you check "Include additional files from my project folder inside the MSI file". When you get to the page
to select additional files inside the MSI file, make sure to check TeamViewer_.exe to embed the the setup file inside the MSI file.
The new .msi file that we have created for TeamViewer, can now be assigned as a software installation through Group Policies.
As a footnote in relation to creating a TeamViewer MSI file, it is worth mentioning that there is an edition of FastTrack Automation Studio
available that can only create MSI files. This edition is very inexpensive, because it does not have the additional features of other editions. If you are only
after MSI features, this edition is worth checking out. The features in each edition are shown below. If you click the "Try" button, you can use FastTrack
Automation Studio for one month for free and you can switch editions on-the-fly to try one versus another. Note that the "Exe to Msi" button in the MSI edition
is located in the top menu in Advanced Menu, as the App Factory does not exist.
Step 2 of 2 - option 2: Installation through a logon script
Instead of deploying an MSI file, you can choose to execute the installation from a logon script.
To make the installation unattended through a logon script, we need to:
- Obtain administrative permissions to install the application.
- Optionally make sure the installation only happens on computers in a certain Active Directory group.
- Execute TeamViewer_.exe passing /S as an administrator.
- TeamViewer starts after successful installation, so we also need to kill it to avoid end-user confusion.
If you do not have UAC enabled, you can execute the installation as part of your logon script
and use the internal FastTrack installer logic to keep track of installations, as explained here
If you do have UAC enabled, you can do this in a similar way with a startup script, see the UAC page
for more information.
We are assuming here that you have put TeamViewer_.exe in a folder named "TeamViewer" in the root of a share called \\AcmeServer\Installers$.
You need to replace this and the installation user with information that is suitable on your network. As part of the logon script, we can then
If Not InstalledBuild TeamViewer,1 Then
If you want TeamViewer installed on all computers, you can remove the outer condition. But in the above
example, TeamViewer is only installed on computers in an Active Directory group called "TeamViewerComputers".
The user "AcmeInstall" must be replaced with an administrative user in your domain. The password must be encrypted
with the "Encrypt Password" tool in the script editor, which can be started by pressing F8.
We now need to create the installation script on the location "\\AcmeServer\Installers$\TeamViewer\Install.fsh". In
the same folder, you also need to have TeamViewer_.exe. The script requires these three lines:
The installation is executed unattended and when the installation is complete, the program
starts and we must terminate it. The user will not see this, as this all happen within a
few milliseconds. Finally the "RegisterInstallation" command ensures that the installation will
not run again, which is explained here
Other points of interest
Similar articles are available. Click here
for an article on
installing MalwareBytes unattended and here
for one on Avast.
If your company is using TeamViewer on a larger scale for your users, you might be interested in setting up a Kiosk PC.
A Kiosk PC is a locked down computer, which is typically used when users mostly work through remote sessions.
It is easy to use TeamViewer with a Kiosk PC, as you can just create menu items that start the TeamViewer exe file to
start sessions - or you could even have TeamViewer builing your shell instead of the Windows Explorer.
Refer to this page
for options for Kiosk computers.