Automate AnyDesk Deployment: Command Line Interface Guide

Table of content

The command line interface offers ways to automate many processes involved with AnyDesk. Here, you’ll find some examples of how to use it with AnyDesk.

Automatic Deployment

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

For this case, we recommend providing a custom MSI installation package, as well as pre-configured versions of the Client/Service from our .exe files that can be easily distributed in this manner.

These can be further customized through the custom client generator at my.anydesk.com.

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

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

A example batch script that will install AnyDesk, register the license key, and set a password, can look like this:

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

Uninstalling AnyDesk

If AnyDesk is no longer needed on certain machines, it can be uninstalled through the built-in uninstaller of the operating system or alternatively, through the command line interface.

This can be done using both the --remove and --uninstall commands as mentioned in the Installation Instructions.

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

AnyDesk Uninstall GUI Prompt

If the removal of AnyDesk needs to happen solely through a script or through management software, --remove is the correct parameter to use.

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

An example of a silent uninstallation without additional user input would be:

anydesk.exe –silent –remove

--remove will only uninstall the AnyDesk application from the Windows operating system but will not remove any remaining files. Files such as those found in the following default directories must be manually deleted or through a script.

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

Connecting via the Command Line Interface

If you intend to implement AnyDesk in existing software, connecting through the command line interface using the commands and parameters as described in Connection Commands can be a useful tool.

Modifying AnyDesk Shortcuts

The parameters found in Connection Commands can be used to modify shortcuts that have been placed on the desktop through AnyDesk.

CMDUseCaseConnectDropToDesktop

This is achieved 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

If you want to harness all the benefits that AnyDesk offers for your business operations, we invite you to try AnyDesk for free! Also, if you want to learn more about purchasing AnyDesk, feel free to contact us.

Published at

Leave a comment

Your email address will not be published

No comments yet!