Command Line Interface Use Cases for AnyDesk: Automation, Deployment, Uninstallation, and More

Table of content

Use Cases for the Command Line Interface

The command line interface offers ways to automate many processes related to AnyDesk. Here are some examples of how to use it with AnyDesk.

Automatic Deployment

The command line functions can be used in combination with software management/deployment tools to deploy and configure AnyDesk on a larger number of devices without the need for manual intervention on each device.

For this case, we recommend providing an MSI installation package, as well as preconfigured versions of our .exe and .msi client/service modules that can be easily distributed in this way.

They can be further customized through the Custom Client Generator at my.anydesk.com.

Standard Module Types Description
Default EXE EXE version of the standard anydesk.com client that can both initiate and receive connections.
Client EXE Module EXE version of a standard client that can only receive connections.
Service EXE Modulee EXE Module EXE version of a standard client that can only initiate connections.

These can be automatically deployed through a script using the commands described in the Installation Commands or through other deployment tools.

An example batch file that will install AnyDesk, register the license key, and set a password could look 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-license echo password123 | “C:\Install\AnyDesk\Here\AnyDesk.exe” –set-password

Uninstalling AnyDesk

In case AnyDesk is no longer needed on certain machines, it can be uninstalled using either the built-in operating system uninstaller or, alternatively, the command line interface.

This can be done using the --remove or --uninstall command as mentioned in the Installation Commands.

--uninstall will start the uninstallation process of the AnyDesk client. With this command, a GUI prompt will appear, guiding the user through the uninstallation process.

Uninstall AnyDesk GUI prompt

If it is assumed that the removal of AnyDesk should be done exclusively through a script or via management software, --remove is the correct parameter to use.

Additionally, if a completely silent removal is intended, adding --silent will prevent any error messages that might occur during the removal process.

An example of a silent removal without any additional user intervention would be:

anydesk.exe –silent –remove

--remove will only uninstall the AnyDesk application from the Windows operating system, but it will not be able to remove any leftover files. Files such as those found in the default directories below need to be manually deleted or through a script.

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

Connecting through the Command Line Interface

If it is intended to integrate AnyDesk into existing software, connecting through the command line interface using the commands and parameters as described in the Connection Commands can be a helpful tool to achieve this.

Modifying AnyDesk Shortcuts

Parameters found in the Connection Commands can be used to modify shortcuts that have been dropped on the desktop via AnyDesk.

CMDUseCaseConnectDropToDesktop

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

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

CMDUseCaseShortcut-300x75

Published at

Comments (0)