Windows WebDAV tray watcher + watchdog (PowerShell 5.1 + WinForms)
Map your Nextcloud server to a real Windows drive letter (e.g. Z:) and keep it healthy. NcDavTray is a small, self‑contained tray app written in Windows PowerShell 5.1 + WinForms and a small amount of embedded C# for DPI and shell notifications. It runs without admin rights and supports both Installed and Portable modes.
-
One‑click drive mapping to a persistent letter (your choice)
-
Auto‑reconnect & auto‑cleanup if the server is offline or in maintenance mode, the letter changes its color
-
Optional subfolder mapping (map any folder from within your nextcloud server)
-
Friendly Explorer appearance (custom label & icon from your Nextcloud favicon)
-
Tray UI: connect/disconnect (pause), status balloon, Settings, About, Exit
-
Two security models:
- Installed: credentials protected with Windows DPAPI (bound to your user profile)
- Portable: credentials encrypted with AES‑256 + PBKDF2 (passphrase you choose)
-
Watchdog for clean unmount if the app (or USB stick in portable mode) disappears
-
WebClient tuning tab: inspect and adjust the underlying Windows WebDAV redirector (WebClient) limits and timeouts with safe defaults, inline help texts and UAC-guarded “Apply changes” button.
-
WebDAV cache tab: monitor the Windows WebDAV redirector cache in real-time, view cached items, clear them manually or auto-wipe on exit via the elevated cache watcher.
-
Multi‑language (i18n) with live switching and simple JSON language packs
- Windows 10 / 11 with Windows PowerShell 5.1 (the provided launcher starts PS 5.1 in STA automatically)
- WebClient service (Windows WebDAV mini‑redirector)
- Nextcloud reachable via HTTPS (connection uses a Nextcloud App Password)
No administrator permissions are required except for the optional WebClient‑service handling and cache watcher.
-
Download the latest ZIP from this repository’s Releases page.
-
Extract the ZIP to a folder in your user profile.
-
Run
installNcDavTray.cmdand choose:- 1 — Installed mode: copies the app into your profile (
%LOCALAPPDATA%\NcDavTray), sets optional per‑user auto‑start (configurable in Settings), creates Start Menu/Desktop shortcuts, and safely stops + restarts any running instance while preserving your config. - 2 — Portable mode: creates a self‑contained portable package in the selected folder. Launch it via the generated
Start NcDavTray.cmd.
- 1 — Installed mode: copies the app into your profile (
First run: open Settings from the tray, enter:
- Server (host only, e.g.
cloud.example.com) - User (Nextcloud user ID)
- App password (create in your Nextcloud profile → Security; the app uses this token for WebDAV)
- Subfolder (optional)
- Drive letter and Display name (optional)
- Language and check interval
Click Save → NcDavTray maps the drive, applies the icon/label, and keeps it online.
- Left‑click: shows a short status balloon (server, drive, subpath, state)
- Right‑click: Connect, Disconnect (pause), Open in Explorer, Settings, About, Exit
NcDavTray provides a WebClient tuning tab in the Settings dialog. It exposes the most relevant registry settings of the underlying Windows WebDAV redirector (WebClient) in a safe, documented way:
- Maximum number of files per folder (attribute cache size)
- Maximum file size (Max = 4 GB)
- Local / internet server timeouts
- Send/receive timeout
- "Server not found" cache lifetime
- Start service / Restart service
- Default service startype (Disabled, Manual, Automatic)
All values are shown with both their current registry value and a readable explanation, and each option has an inline help text.
Reading the settings does not require admin rights; elevation (UAC) requires administrator permissions and is only requested when you click “Apply changes” which will write the new values back to the WebClient service.
The WebDAV cache tab exposes the actual Windows WebClient cache directory used for all WebDAV drives — including NcDavTray. NcDavTray ships a lightweight elevated cache watcher, which gives you visibility into what the redirector has stored and lets you clear it safely without touching WebClient or your mapped drive.
Features include:
- Real-time cache overview (UUID-based entries, type-grouped)
- Total cache size + file count summary
- Optional live updates while the watcher is active
- One-click Clear cache
- Optional Clear cache on exit — wipes the redirector cache automatically when all instances are closed
(ideal for privacy, shared devices, or testing redirector behaviour)
This tool helps diagnose WebDAV performance, compare timeout tuning results, and keep long-lived systems free of stale redirector data.
Live switching with simple JSON language packs:
- builtin
- English
- i18n file:
- German
- Spanish
- French
- Italian
- Dutch
- Portuguese (Brazil)
- (More to come, translators welcome)
-
Password handling
- Installed: stored under your Windows account via DPAPI; never written in plain text or placed on the command line.
- Portable: stored in
NcDavTray_secret.datencrypted with AES‑256‑CBC, key derived via PBKDF2 (100k iterations) from your passphrase; decrypted only in memory.
-
Network scope: NcDavTray only connects to your Nextcloud host for:
- reachability/maintenance-mode check (
/status.php) - folder picker via Nextcloud OCS API (listing/validation)
- server favicon and user avatar
- WebDAV operations required for mapping/unmapping
No telemetry or analytics. No third-party calls. No background update checks.
- reachability/maintenance-mode check (
-
Cleanup
- on disconnect/exit, the app unmounts the drive and removes cosmetic branding so Explorer doesn’t keep stale entries.
- optional cache auto-clear on watcher exit ensures no leftover WebDAV cache remains on shared or untrusted systems.
- Update (Installed): download the new ZIP and run
installNcDavTray.cmd→ choose 1. The running instance is stopped and restarted automatically; your configuration is preserved. - Update (Portable): run
installNcDavTray.cmd→ choose 2 and point to your existing portable folder. Your*_portable.jsonand*_secret.datare kept. - Uninstall (Installed): open Settings → Uninstall.
- Uninstall (Portable): exit the app and delete the portable folder.
- Author & Maintainer: [ernolf] Raphael Gradenwitz
- Acknowledgements: Windows WebDAV mini-redirector, and the PowerShell & WinForms ecosystem.
