Windows Command Line Interface: A Comprehensive Guide for AnyDesk Users

Table of content

The following commands can be entered in the Windows command line or used in a script to automate parts of AnyDesk.

It is important to execute these commands in the correct location where AnyDesk is located or specify the correct path manually.

By default, standard AnyDesk clients from anydesk.com are installed in the following location:
C:\Program Files (x86)\AnyDesk\AnyDesk.exe

For custom clients created from my.anydesk.com, they can be found in the following location:
C:\Program Files (x86)\AnyDesk-<prefix>\AnyDesk-<prefix>.exe

The <prefix> can be found on the Clients Details page of an existing custom client configuration under the Files tab at my.anydesk.com. It is randomly generated and unique for each account.

Installation Commands

These commands are used when installing or updating AnyDesk through the command-line interface in the form:

anydesk.exe –install <additional_parameters>

For example:

anydesk.exe –install  “C:\Program Files (x86)\AnyDesk” –start-with-win –create-desktop-icon

On the other hand, installing AnyDesk MSI packages simply uses the following command:

anydesk.msi (optional: INSTALL=““)

Parameter Description
--install Install AnyDesk in the specified . For example, C:\Program Files (x86)\AnyDesk
--start-with-win Automatically start AnyDesk with Windows. This is necessary to be able to connect after restarting the system.
--create-shortcuts Create an entry in the start menu.
--create-desktop-icon Create a shortcut on the desktop for AnyDesk.
--remove-first Remove the current AnyDesk installation before installing the new one. For example, when updating AnyDesk manually.
--silent Do not start AnyDesk after installation and do not show error message boxes during installation.
--update-manually Manually update AnyDesk (default for custom clients).
--update-disabled Disable automatic AnyDesk update.
--update-auto Automatically update AnyDesk (default for standard clients, not available for custom clients).

Back to top

Client Commands

These commands can be used to interact with the AnyDesk client through the command-line interface or scripts.

Command Description
anydesk.exe See Client Command Parameters.
echo <license_key> | anydesk.exe –register-license Register the specified license key. (Requires administrative privileges)
echo <my_password> | anydesk.exe –set-password Set the specified password for unattended access.

Client Command Parameters

Parameter Description
--uninstall Uninstall AnyDesk (with prompts).
--remove Uninstall AnyDesk without prior notice (silent uninstallation).
--tray Start the process creating the tray icon.
--start Start the AnyDesk service.
--stop-service Stop the AnyDesk service.
--restart-service Restart the AnyDesk service.
--remove-password Remove the unattended access password. (Requires administrative privileges) Note that pre-set passwords of custom clients cannot be removed.
--get-alias Return the AnyDesk alias. Must be run in a script.
--get-id Return the AnyDesk-ID. Needs to be run in a script.
--get-status Return the AnyDesk-ID. Must be run in a script.
--version Return the current version of the AnyDesk client. Must be run in a script.
--settings Open the default settings page.
--admin-settings Open the global settings page.
--settings:<viable_parameter>**Viable Parameters:**ui, security, alias, privacy, video, capture, audio, connection, file_transfer, recording, printer, wol, license, about Open the specified settings page.
--admin-settings:<viable_parameter> **Viable Parameters:**capture, security, connection, recording Open the specified global settings page. (Requires administrative privileges)
--disclaimer Show the custom disclaimer. This parameter only works on custom clients with the disclaimer enabled.
--show-advert Show the AnyDesk advertisement page. Thank you for sharing!

Client Batch Scripts

Get AnyDesk ID:

@echo off
for /f “delims=” %%i in (’“C:\Program Files (x86)\AnyDesk\AnyDesk.exe” –get-id’) do set CID=%%i
echo AnyDesk ID is: %CID%
pause

Get AnyDesk Alias:

@echo off
for /f “delims=” %%i in (’“C:\Program Files (x86)\AnyDesk\AnyDesk.exe” –get-alias’) do set CID=%%i
echo AnyDesk Alias is: %CID%
pause

Get Online Status:

@echo off
for /f “delims=” %%i in (’“C:\Program Files (x86)\AnyDesk\AnyDesk.exe” –get-status’) do set CID=%%i
echo AnyDesk status is: %CID%
pause

Get AnyDesk Version:

@echo off
for /f “delims=” %%i in (’“C:\Program Files (x86)\AnyDesk\AnyDesk.exe” –version’) do set CID=%%i
echo AnyDesk version is: %CID%
pause

Back to top

Connection Commands

A connection can be established through the command-line interface.
When requesting a connection through the command line, various parameters can be added.

Command Description
anydesk.exe <ID/Alias> AnyDesk will request a connection with the specified client. See Optional Connection Command Parameters for additional parameters
echo | anydesk.exe <ID/Alias> –with-password AnyDesk will send a connection request to the specified client with the entered password.

Optional Connection Command Parameters

Parameter Description
--file-transfer AnyDesk will initiate a file transfer session.
--fullscreen AnyDesk will initiate an interactive session in full-screen mode.
--plain AnyDesk will initiate an interactive session in a simple window without borders or menu points.

Back to top

Published at

Leave a comment

Your email address will not be published

No comments yet!