5 Practical Uses for AnyDesk Command-Line Interface | Automation, Deployment & More

Table of content

The command-line interface provides various ways to automate tasks with AnyDesk. Here are some examples of how to utilize it with AnyDesk.

Automated Deployment

The command-line features can be leveraged in combination with software management/deployment tools to deploy and configure AnyDesk on multiple devices without manual intervention.

For this purpose, we recommend using a custom MSI installation package and preconfigured versions of our .exe files, which can be easily distributed. These can be further customized through the custom client generator on my.anydesk.com.

These installations can be automated through scripts using the commands described in the Installation Commands or other deployment tools.

An example of a batch script to install AnyDesk, register the license key, and set a password looks like this:

@echo off
AnyDesk.exe –install “C:\Install\AnyDesk\Here” –start-with-win –silent –create-shortcuts –create-desktop-icon
echo licence_keyABC | “C:\Install\AnyDesk\Here\AnyDesk.exe” –register-licence
echo password123 | “C:\Install\AnyDesk\Here\AnyDesk.exe” –set-password

Uninstalling AnyDesk

In situations where AnyDesk is no longer required, it can be uninstalled using the operating system uninstaller or the command-line interface.

This can be achieved using the --remove or --uninstall commands as mentioned in the Installation Commands.

--uninstall initiates the uninstallation process with a GUI prompt guiding the user through the uninstallation process.

Uninstall AnyDesk GUI prompt

For purely script or management software-driven removal, --remove is the appropriate parameter to use. Adding --silent ensures a completely silent removal without error message prompts.

For example, a silent removal script would be:

anydesk.exe –silent –remove

--remove only uninstalls AnyDesk but does not remove leftover files, which must be manually deleted or removed through a script from the default directories.

C:\Program Files (x86)\AnyDesk
%appdata%\AnyDesk
%programdata%\AnyDesk

Connecting via the Command-Line Interface

If integrating AnyDesk into existing software, using the command-line interface and parameters from Connection Commands can be advantageous.

Modifying AnyDesk Shortcuts

Parameters from Connection Commands can modify shortcuts placed on the desktop by AnyDesk.

This is achieved by appending a parameter to the “Target” field in “Properties” of the desktop shortcut. For example:

“C:\Program Files (x86)\AnyDesk\AnyDesk.exe” 123456789 –plain

CMDUseCaseConnectDropToDesktop

CMDUseCaseShortcut-300x75

Published at

Comments (0)