# Trying to run command line produces an error

**URL:** https://forum.duplicati.com/t/trying-to-run-command-line-produces-an-error/12540
**Category:** Support
**Created:** [June 9, 2021, 6:57pm UTC](https://forum.duplicati.com/t/trying-to-run-command-line-produces-an-error/12540 "2021-06-09T18:57:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tomasv](https://forum.duplicati.com/user_avatar/forum.duplicati.com/tomasv/32/4912_2.png) [@tomasv](https://forum.duplicati.com/u/tomasv)
#### Post date: [June 9, 2021, 6:57pm UTC](https://forum.duplicati.com/t/trying-to-run-command-line-produces-an-error/12540/1 "2021-06-09T18:57:30Z")

</div>

I am trying to run command line in the form of:

“C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe” repair …

But I am getting “This app can’t run on your PC” To find a version for your PC contact the publisher

I have it setup to run as service and the GUI runs correctly

Windows Version 10.0.19042 Build 19042

Any ideas?

 ![image](https://forum.duplicati.com/uploads/default/original/2X/4/4654235e8e1ad56a88ec0af4568c04fa8bad1ee9.png)

---

<div class="post-metadata">

### Author: ![tomasv](https://forum.duplicati.com/user_avatar/forum.duplicati.com/tomasv/32/4912_2.png) [@tomasv](https://forum.duplicati.com/u/tomasv)
#### Post date: [June 10, 2021, 6:07pm UTC](https://forum.duplicati.com/t/trying-to-run-command-line-produces-an-error/12540/2 "2021-06-10T18:07:40Z")

</div>

Any ideas, please? I need to to try to run  
`list-broken-files` or `purge-broken-files`  
Because one of the backups is failing and deleting and recreating the DB has not helped

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [June 10, 2021, 9:08pm UTC](https://forum.duplicati.com/t/trying-to-run-command-line-produces-an-error/12540/3 "2021-06-10T21:08:07Z")

</div>

> [@tomasv](#):
>
> I need to to try to run  
> `list-broken-files` or `purge-broken-files`

> [@tomasv](#):
>
> the GUI runs correctly

> [@tomasv](#):
>
> Any ideas?

An easy idea is to run them in GUI [Commandline](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#using-the-command-line-tools-from-within-the-graphical-user-interface). The other issue has no past forum or Issues reports, meaning it may be harder to resolve. You can start by looking in About → System info to determine the BaseVersionName and ServerVersionName. What is C:\Program Files\Duplicati 2\changelog.txt start?

If you like, you can also turn on Task Manager → Details → Image path name to see what Service runs, however you will probably see two Duplicati.WindowsService.exe processes and a Duplicati.Server.exe which may be running some combination of Duplicati versions, and as a guess maybe that’s relevant…

EDIT:

If you find that the Program Files version is not being used by the service, but another is, you could try to run from whatever the Server is running, if you absolutely have to use true CLI instead of GUI somehow.

---

<div class="post-metadata">

### Author: ![JensK](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@JensK](https://forum.duplicati.com/u/JensK)
#### Post date: [February 25, 2023, 10:27am UTC](https://forum.duplicati.com/t/trying-to-run-command-line-produces-an-error/12540/4 "2023-02-25T10:27:38Z")

</div>

I’m taking this old thread because I have the same problem now.

I’ve had Duplicate 2.0.6.2\_experimental\_2021-05-29 running unchanged for months on Windows 10 with native Microsoft Defender as my antivirus. Last week I investigated some things on the command line using the command _C:\Programs\Duplicati 2\Duplicati.CommandLine.exe_. This works as expected. But suddenly I get the blue message that tomasv posted above. I still have the same command prompt window open and I see a few lines above the working command, and now it doesn’t work anymore.

I’ve already done some googling for the problem and disabled the Microsoft SmartScreen for example - but to no success.

Does anyone have any idea what could be the reason for this message?

---

<div class="post-metadata">

### Author: ![JensK](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@JensK](https://forum.duplicati.com/u/JensK)
#### Post date: [February 25, 2023, 10:56am UTC](https://forum.duplicati.com/t/trying-to-run-command-line-produces-an-error/12540/5 "2023-02-25T10:56:35Z")

</div>

Shame on me, I caused the error by myself. With a couple of days of delay, I just noticed that the Duplicati.CommandLine.exe has only 0 bytes. In the opened window with the command prompt I scrolled back again and looked at all the commands carefully. Apparently, I made a copy-and-paste mistake once and typed `C:\Windows\system32>"C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" ...`, which then zeroed out the file. Sorry…
