Automatic Deployment

See also: Command Line Interface

Service- and Customer Client

Module Type
Customer Module [CM-MSI Installation]
Service Module [SM-MSI Installation]
Customer Module [CM-EXE Installation]
Service Module [SM-EXE Installation]

Deploying AnyDesk

AnyDesk provides a [MSI] version for Windows. You can also generate custom MSI files at my.anydesk.com. To automatically deploy AnyDesk with MSI file, please use the command line:

anydesk.msi

Note: The installation via command line must run as admin.

It is also possible to use the exe file for automatic deployment. AnyDesk can be instructed to install itself from script:

anydesk.exe --install <location> --start-with-win

Note:
  • <location> must be a full qualified path (e.g. "C:\Program Files (x86)\AnyDesk").
  • --start-with-win is to start AnyDesk with Windows, which is necessary for remote restart, etc.

Additional command parameters (after --install --start-with-win):

Parameter Description
--remove-first Perform an update or replace the existing installation
--create-shortcuts Create start menu entry
--create-desktop-icon Create a link on the desktop for AnyDesk
--silent Do not start AnyDesk after installation and do not display error message boxes.
--update-manually Update AnyDesk manually.
--update-disabled Disable automatic update of AnyDesk.
--update-auto Update AnyDesk automatically (default).

See also: Exit Codes.

Automatically Setting a Password after Installation

For security reasons, a password can not be set from the command line directly as this would enable malicious users to spy the password from the command line in Task Manager. Instead, a pipe is used to set the password. For example, to set a password for an already installed AnyDesk, use this syntax in a batch file:

echo my_password123 | anydesk.exe --set-password

Example

To install AnyDesk, set a password and register a license key from a batch file at the same time, you could use the following code:

@echo off start /wait anydesk --install "c:\anydesk" --start-with-win --silent --create-shortcuts --create-desktop-icon

echo licence_keyABC | anydesk.exe --register-licence

echo password123 | anydesk.exe --set-password

This will install AnyDesk and wait for the installation to finish, then it will set a password in the newly installed AnyDesk.

Removing AnyDesk

To remove AnyDesk: anydesk.exe --uninstall

Uninstalling without Notice (Silent Uninstall)

anydesk.exe --remove