Recomendamos utilizar un script específico para desplegar TeamViewer con éxito en tus dispositivos.

En este artículo, te mostraremos nuestro script recomendado y te explicaremos el significado de cada parámetro.

Este artículo se aplica a l@s usuari@s de licencias Corporate y Tensor que deseen implementar TeamViewer (versión 15 o posterior) en sus dispositivos Windows.

Scripts recomendados

🚨Nota importante: Por favor, asegúrate de reemplazar [your_xxx] con tus propios valores.

Este script procesa el despliegue en dos pasos:

  1. Instalación del paquete
  2. Asignación de cuenta

Script para el Host de TeamViewer:

start /wait MSIEXEC.EXE /i "PATH_TO_MSI_FILE\TeamViewer_Host.msi" /qn CUSTOMCONFIGID=YOUR_CUSTOM_CONFIG_ID
timeout /t 30 /nobreak
"C:\Program Files (x86)\TeamViewer\TeamViewer.exe" assignment --id YOUR_ASSIGNMENT_ID

Script para el Full Client (64 bits):

start /wait MSIEXEC.EXE /i "PATH_TO_MSI_FILE\TeamViewer_Full.msi" /qn
timeout /t 30 /nobreak
"C:\Program Files\TeamViewer\TeamViewer.exe" assignment --id YOUR_ASSIGNMENT_ID

Script para el Full Client (32 bits):

start /wait MSIEXEC.EXE /i "PATH_TO_MSI_FILE\TeamViewer_Full.msi" /qn
timeout /t 30 /nobreak
"C:\Program Files (x86)\TeamViewer\TeamViewer.exe" assignment --id YOUR_ASSIGNMENT_ID

Parámetros principales

Explicaremos aquí los parámetros que utilizamos en nuestros scripts recomendados:

▹msiexec.exe /i

Instala el paquete.

▹/qn

Permite la instalación silenciosa.

▹"PATH_TO_MSI_FILE\TeamViewer_Host.msi"

Define la ruta de instalación.

📌Nota: También puede estar en una ruta de red.

▹CUSTOMCONFIGID=xxxxxx

Aplica la personalización de tu módulo.

📌Nota: Sólo se aplica para el Host de TeamViewer.

▹SETTINGSFILE="YOURPATH\Nsu nombre de archivo.tvopt"

Importa las opciones de TeamViewer.

Para más información, lee el siguiente artículo:

📄 Exportar la configuración para desplegar el Host

📌Nota: El valor debe ser una ruta local absoluta válida o una ruta a un recurso compartido de red.

🚨 No utilices este parámetro en combinación con IMPORTREGFILE.

▹ENABLEOUTLOOKPLUGIN=true o false

Controla la desactivación/activación del plugin de Outlook

true: El plugin TeamViewer Outlook se activa tras la instalación (por defecto)

falso: El plugin TeamViewer Outlook se desactiva después de la instalación

▹INSTALLSECURITYKEYREDIRECTION= 0 or 1

Instala un controlador de dispositivo virtual necesario para la función de redirección de claves de seguridad que permite el uso de tarjetas inteligentes y dispositivos basados en fido a través de una sesión de TeamViewer

0: No instala el controlador (por defecto)

1: Instala el controlador

Opciones posibles en la línea de comandos:

Hay opciones adicionales que puedes añadir a tu línea de comandos:

Alias

Para Windows:

--device-alias=[<name>]

Para macOS:

-device_alias [<name>]

Para Linux:

--device-alias=[<name>]

El alias para el nuevo dispositivo en la lista de dispositivos. No se aplicará ningún alias si el dispositivo ya está en la lista de contactos. La propiedad puede tomar los siguientes valores:

  • --alias (sin valor)alias del ordenador será la ID de TeamViewer
  • --alias helloalias del ordenador será "hello"
  • Parámetro Alias no especificado alias de este ordenador será %computername%
  • --alias %systemvariable%alias será la variable de sistema utilizada, p. ej.%username%

Ejemplo:

"C:\Program Files\TeamViewer\TeamViewer.exe" assignment --id 123 --device-alias=%COMPUTERNAME%-%USERNAME%

💡 Hint: Si quieres usar espacios, tienes que poner todo en "..." como en el siguiente ejemplo:

"C:\Program Files\TeamViewer\TeamViewer.exe" assignment --id 123 --device-alias=“%COMPUTERNAME% Test %USERNAME%“

DesktopShortcut

Evitará que se instalen los accesos directos del escritorio.

msiexec /i "Path\To\TeamViewer.msi" /qn ADDLOCAL=ALL REMOVE=f.DesktopShortcut

📌Nota: Si en el pasado desplegaste el Host de TeamViewer utilizando el archivo MSI con la opción DESKTOPSHORTCUTS=0, y ahora quieres eliminar el acceso directo, utiliza el siguiente comando::

msiexec /i "Path\To\TeamViewer.msi" /qn REMOVE=f.DesktopShortcut

Retries

--retries

La asignación se vuelve a intentar en caso de errores temporales. Ten en cuenta que hay un tiempo de espera de 1 segundo entre cada intento.

Timeout

--timeout

Establece el tiempo de espera global en segundos utilizado para todos los intentos de asignación.

Ejemplo:

TeamViewer.exe assignment --id YOUR_ASSIGNMENT_ID
--retries=3 --timeout=120

Códigos de error

Error code Description Problem/solution

1

Invalid command line arguments

You seem to have misspelled or used a wrong command.  Check your command and try again.

2

Signature verification error

-

3

Product not installed

TeamViewer is not installed. Install TeamViewer before doing an assignment.

4

Service config - access failed

// ComAPI

The assignment configuration could not be verified against the TeamViewer Cloud. Please try again later.

400

(40 under Linux/FreeBSD)

MDv2Assignment - invalid argument

There seems to be an error in the command line syntax or an invalid assignment ID is used. Please check your overall command line syntax and verify that the copied assignment ID is a valid configuration from the Management Console.

 401

 (41 under Linux/FreeBSD)

MDv2Assignment - service not running

The assignment can't be done because TeamViewer is not running properly. Please verify that the TeamViewer service is running.

402

 (42 under Linux/FreeBSD)

MDv2Assignment - service incompatible version

The TeamViewer service is incompatible with the executed TeamViewer client version. It seems that the installation wasn't completed properly. Please check the installation and if necessary re-install TeamViewer again.

403

 (43 under Linux/FreeBSD)

MDv2Assignment - not online

The TeamViewer client could not connect to the TeamViewer cloud in order to assign your device. Please check if the client is online and if your internet connection works properly and re-try the assignment. Consider using the retries option on the command line interface if that happens frequently.

404

 (44 under Linux/FreeBSD)

MDv2Assignment - already running

Another assignment process is already running. Please check the status of that assignment. You can do that for example by checking if the device is already registered as a managed device in the Management Console.

405

 (45 under Linux/FreeBSD)

MDv2Assignment - timeout

Your assignment attempt was timed out. Please try again. Consider increasing the timeout on the command line interface in case this happens frequently and/or the network is unstable e.g. mobile ones.

406

 (46 under Linux/FreeBSD)

MDv2Assignment - failed

Your assignment failed due to unknown reasons. Please save your logs and contact support.

407

 (47 under Linux/FreeBSD)

MDv2Assignment - access denied

You don't have the necessary permission to execute an assignment. Ensure that your user has local administrator rights.

408

(48 under Linux/FreeBSD)

MDv2Assignment - Denied by policy

The TeamViewer policy active on this device prevents removing the existing assignment state. Please disable the policy in the Management Console.

Note: Reassigning implicitly removes the existing state and is therefore also denied.