Correct syntax of compare command?

It is confused because it expects the first argument to be the destination url:

> Duplicati.CommandLine.exe help compare
Usage: compare <storage-URL> [<base-version>] [<compare-to>] [<options>]

  Compares two backups and shows differences. If no versions are given, changes are shown between the two latest backups. The versions can either be timestamps or backup version numbers. If only one version is given, the most recent backup is compared to that version.

  --verbose
    Shows names of files
  --include=<filter>
    Adds an include filter (for verbose output)
  --exclude=<filter>
    Adds an exclude filter (for verbose output)

So it wants you to write:

Duplicati.CommandLine.exe compare file://dummy 0 2 --dbpath=C:\Windows\system32\config\systemprofile\AppData\Local\Duplicati\VHKSZYUOFM.sqlite --full-result

Duplicati expects encryption, so you need to add --no-encryption to disable the passphrase prompt. This command will read the data straight from the drive without relying on the local database:

Duplicati.CommandLine.exe compare d:\data 0 2 --no-encryption --full-result --no-local-db