The full version of TeamViewer on Windows can run command line parameters that initiate a session to a remote device using a pre-set ID, password, and connection mode.

You can use these parameters to run TeamViewer from the Command Prompt, a script (for example, a .bat file), or a shortcut on your Desktop or Start menu. 

How to use Command-line parameters

Parameters with and without a value

Note: Some parameters are only available with the TeamViewer (Classic) version 13.2.

There are two types of parameters, with a value and without a value.

Example for a parameter without a value: 

TeamViewer.exe --noInstallation

Example for a parameter with a value: 

TeamViewer.exe --id 123456789

In most cases, only one value is expected; if multiple are given, only the first one is used.

If the value of a parameter contains a space, the value must be enclosed in quotation marks.

Notes:

  • A long parameter is called like this (with two “-“ -> “--“):
  • TeamViewer.exe --minimize
    
  • If the parameter has a short variant, it can also be called with only one “-“:
  • TeamViewer.exe -n
    
  • However, using “--n” is also possible on some platforms. Multiple parameters can be combined in one call, and parameters are case-sensitive.
Mode
Description

fileTransfer

Start a file transfer connection

vpn¹

Start a VPN connection

  1. Only supported on Windows with connections to Windows or Linux device.

Example:

--mode fileTransfer

Quality

-q | --quality N

Used in combination with "id". Connection quality setting to use for the connection.

N
Description

1

automatic quality selection

2

optimize quality

3

optimize speed

4

custom settings

5

default

To select a quality option, enter the desired option's N value after the quality flag, separated by a space. The default value is determined from your policies and machine settings. Example:

-q 2 | --quality 2

Access Control

-a | --ac N

Used in combination with "id". Access control rights to use for the (outgoing) connection.

N
Description

0

full access

1

confirm all

2

view and show

3

custom

9

default

To select an access control option, enter the value of N of the desired option after the ac flag, separated by a space. The default value is determined from your policies and machine settings.

Note: When using the custom parameter, the previous custom outgoing access control values will be applied. Example:

-a 1 | --ac 1

Application

The following options are supported:

Note: Please find the Parameter and short variant on the first line, with the description for each beneath.

Minimize

Start TeamViewer minimized. If "Start TeamViewer with Windows" is enabled, TeamViewer will be started in the tray instead.

Example: 

TeamViewer.exe --minimize

play

Play a TeamViewer session file (*.tvs)

Example:

TeamViewer.exe --play C:Users\shvarts\Desktop\A\abc.tvs

control

Start a connection (RC/Meeting) to an ID specified in the given control file (*.tvc)

Where to find .tvc files:

  • %appdata%\TeamViewer\MRU\RemoteSupport

  • %appdata%\TeamViewer\MRU\Meeting

Example:

TeamViewer.exe --control C:\Users\shvarts\Desktop\A\abc.tvc

ProxyIP

Proxy IP and Port, formatted like: IPAddress:Port

Example:

TeamViewer.exe --ProxyIP 192.168.0.2:8080

ProxyUser

Used in combination with "ProxyIP". Proxy Username.

Example:

TeamViewer.exe --ProxyIP 192.168.0.2:8080 --ProxyUser admin

ProxyPassword

Used in combination with "ProxyIP". Proxy Password Base64 encoded.

Example:

TeamViewer.exe --ProxyIP 192.168.0.2:8080 --ProxyUser admin --ProxyPassword test

sendto

Send a list of files to a partner in your partner list. Prompts may open for login and recipient selection.

Examples:

Single file:

TeamViewer.exe --Sendto C:\Users\shvarts\Desktop\A\abc.jpg

Multiple files:

TeamViewer.exe --Sendto C:\Users\shvarts\Desktop\A\abc.jpg C:\Users\shvarts\Desktop\A\abcd.jpg

COM API

On Windows, the COM API could be used like this:

TeamViewer.exe api <options>

Option
Description
TeamViewer version

--install

Install the COM API

>=11

--uninstall

Uninstall the COM API

>=11

How to verify a successful installation

Via logfile

Open the TeamViewer logfile from %appdata%\TeamViewer and find the following entries:

CommandLineTasks: initializing...

CommandLineTasks: installing COM-API

API: Installing API ...

API: ... successfully installed, calling SignalServiceParamChange ...

API: ... SignalServiceParamChange finished

CommandLineTasks: installing COM-API successful

CommandLineTasks: finished

Via Windows PowerShell

Use the following PowerShell commands:

$tv = new-object -com TeamViewer.Application
$tv.ApiVersion

Verify that any version will be written in Windows PowerShell, for example:

How to verify successful uninstallation

Via logfile

Open the TeamViewer logfile from %appdata%\TeamViewer and find the following entries:

CommandLineTasks: initializing...

CommandLineTasks: uninstalling COM-API

API: Uninstalling API ...

API: ... successfully uninstalled, calling SignalServiceParamChange ...

API: ... SignalServiceParamChange finished

CommandLineTasks: uninstalling COM-API successful

CommandLineTasks: finished

Via Windows PowerShell

Use the following PowerShell commands:

$tv = new-object -com TeamViewer.Application

Verify that an error will be printed in PowerShell.

Mode
Description

fileTransfer

Start a file transfer connection

N
Description

1

automatic quality selection

2

optimize quality

3

optimize speed

4

custom settings

5

default

N
Description

0

full access

1

confirm all

2

view and show

3

custom

9

default