Mastering AnyDesk Automation: Command-Line Interface Guide for Seamless Deployment and Management
The command-line interface offers ways to help automate many processes involved with AnyDesk. Here, you can find some examples of how to use it with AnyDesk.
Automatic Deployment
The command-line functionalities 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 our Client/Service .exe files that can be easily distributed in this way.
These can then be automatically deployed through a script using the commands described in Installation Commands or through other deployment tools.
An example of a batch script that will install AnyDesk, register the license key, and set a password would 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
If AnyDesk is no longer needed on certain machines, it can be uninstalled through the operating system’s built-in uninstaller or, alternatively, through the command-line interface.
This can be done using the --remove or --uninstall command, as mentioned in Installation Commands.
--uninstall will start the uninstallation process for the AnyDesk client, initiating a GUI prompt to guide the user through the uninstallation process.
If the removal of AnyDesk is to happen purely through a script or through management software, --remove is the correct parameter to use.
In addition, if a completely silent removal is intended, adding --silent will prevent any error messages that may occur during the removal process from appearing.
An example of a completely silent removal without additional user input would be:
anydesk.exe –silent –remove
--remove will only uninstall the AnyDesk application from the Windows operating system, but it cannot remove any remaining files. Files such as those found in the following default directories must be manually deleted or removed through a script:
C:\Program Files (x86)\AnyDesk
%appdata%\AnyDesk
%programdata%\AnyDesk
Connecting through the Command-Line Interface
If AnyDesk is to be implemented in existing software, connecting through the command-line interface using the commands and parameters as described in Connection Commands can be a useful tool to achieve this.
Modifying AnyDesk Shortcuts
Parameters found in Connection Commands can be used to modify shortcuts generated by AnyDesk.
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
- Published at