Skip to content

Diagnostics report

ernolf edited this page Aug 17, 2026 · 1 revision

🔬 Diagnostics report

The repository ships a script that collects the Windows state around a WebDAV drive into a single text file. It is what turns it does not work into something answerable without a dozen questions back and forth.

Tip

TL;DR — Copy NcDavTray_diag.ps1 and Run_NcDavTray_diag.cmd from tools/diagnostics/ onto the affected machine, double-click the .cmd, answer the prompts. For anything you post publicly, pick the profile Public issue / GitHub: it replaces host names, user names, labels and folder names with placeholders. Share tokens and passwords never reach the report at all.

🧾 What it is

Two files in tools/diagnostics/:

File What it does
NcDavTray_diag.ps1 the script itself
Run_NcDavTray_diag.cmd starts it with the Windows PowerShell that is on every machine, so nothing has to be installed

The script is read-only. It reads the registry, the service state, the mount list and the Windows event log, and it writes exactly one file: the report, next to itself. It needs no administrator rights, and it asks for none.

It does not need NcDavTray to be installed, either. There is a portable mode where you point it at the folder your portable copy lives in, and a third mode that skips the NcDavTray part entirely and reports only the Windows side.

▶️ Running it

  1. Copy both files into any folder on the affected machine, for example onto the desktop.
  2. Leave NcDavTray running the way you normally use it, if you can. A report taken while the drives are mapped says considerably more than one taken with everything shut down.
  3. Double-click Run_NcDavTray_diag.cmd.
  4. Answer the prompts:
    • the profile, local or public,
    • the mode: installed, portable, or skip,
    • whether to include UI, font and DPI information, which only matters for a report about the appearance of the windows,
    • whether to run the HTTP test, a single unauthenticated request to /status.php on your server. It uses the first host from your configuration, and asks you for one only if it found none.
  5. The report lands beside the scripts as NcDavTray_diag_<date>_<time>.txt.

Note

Both optional parts can be declined, and the report says so rather than pretending they were not asked for. Nothing in the script contacts anything except the one request you agree to.

🎭 The two profiles

The first prompt decides what the finished report is allowed to contain.

Profile What it does
Local diagnostics keeps the real names. This is the one to pick when you are reading the report yourself. It still offers anonymization, in case you change your mind
Public issue / GitHub replaces everything identifying with placeholders, automatically

In the public profile, the report reads like this:

Config: Server=<NC_HOST(anonymized)> Kind=account User=<NC_USER(anonymized)> Drive=M: SubPath=<PATH1(anonymized)>/<LABEL(anonymized)>
  Expected UNC: \\<NC_HOST(anonymized)>@ssl\remote.php\dav\files\<NC_USER(anonymized)>\<PATH1(anonymized)>\<LABEL(anonymized)>
  Drive provider: \\<NC_HOST(anonymized)>@ssl\remote.php\dav\files\<NC_USER(anonymized)>\<PATH1(anonymized)>\<LABEL(anonymized)>
  Provider matches expected UNC: True
Placeholder Stands for
<NC_HOST> your Nextcloud server
<NC_USER> your Nextcloud account name
<WIN_HOST>, <WIN_USER> the machine name and your Windows logon name
<LABEL> the label you gave a mount
<PATH1>, <PATH2> folder names inside your cloud, numbered so the same folder is recognisable across lines
<SHARE_TOKEN> the token of a share link, masked in both profiles

What the placeholders preserve is exactly what a diagnosis needs: whether two lines name the same server, whether the path Windows mapped matches the path NcDavTray expected, and how deep it goes. What they remove is who and where.

Important

The comparisons in the report are made on the real values before anything is masked. A line saying Provider matches expected UNC: True is a real answer, not an artefact of two placeholders looking alike.

📑 What is in the report

Section What it answers
System / PowerShell Windows build, PowerShell version, architecture, UI language
Current user / elevation whether the process runs elevated, and whether the account could elevate at all
NcDavTray presence which mode, which version, and the full mount list with kind, drive, order and whether a password is stored for that account
WebClient service status and startup type of the service everything depends on
WebClient registry parameters the tuning values, in hex and decimal: file size limit, the timeouts, the server not found cache lifetime
WebDAV cache / cache watcher whether the cache directory exists and is readable, and what the watcher reports about it
Mapped drives twice, once from net use and once from Windows itself, because the two disagree in interesting ways when something is wrong
Mapping / branding checks for every mount: the expected UNC path, what is actually mapped, whether they match, the Explorer label and the drive icon
System event log recent WebClient and MRxDAV entries, which is where the redirector says what it will not say anywhere else
Optional HTTP connectivity test if you agreed to it: status code and elapsed time of one request to your server

What the tuning values mean is on WebClient service, and what the cache is on WebDAV cache. The mount list and the mapping checks are the part worth reading first. A mount whose expected UNC does not match what is mapped explains most cases of the drive is there but wrong, and one whose MountPoints2 key is missing explains most cases of the label is gone.

🚫 What is never in it

  • No password. Neither the stored value nor its length nor its encrypted form. The report says Password stored for this account: yes or no, and nothing else.
  • No share token. A token is not a name but a key: anybody holding it can open the share. It is replaced in every report, whichever profile you pick, including inside the net use output where Windows prints it as part of the path.
  • No file names or file contents. The cache section reports counts, sizes and timestamps. What is in those files is not the report's business.
  • No server name in the HTTP test. The report says it asked /status.php, what came back and how long it took, not whom it asked.

📮 Posting it

Paste the whole file into the issue, inside a fenced code block. Excerpts tend to leave out the section that would have answered the question.

Before you paste it, it is worth reading through once. It is plain text and deliberately readable, and if the public profile has missed something you consider identifying, editing it out by hand is entirely legitimate. Say what you removed, so nobody spends time looking for it.

See Troubleshooting for what the error numbers mean, and Speed and large files when the drives work but feel slow.

Clone this wiki locally