Map your Nextcloud server to a Windows drive letter with NcDavTray

NcDavTray — Tiny Nextcloud WebDAV Tray for Windows

Windows WebDAV tray watcher + watchdog (PowerShell 5.1 + WinForms)

Release License PowerShell 5.1

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 (usually present on every Windows system). It runs without admin rights and supports both Installed and Portable modes.


Features

  • 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

  • Multi‑language (i18n) with live switching and simple JSON language packs:

    • builtin
      • English
    • i18n file:
      • German
      • Spanish
      • French
      • Dutch
      • Portuguese (Brazil)
    • (More to come, translators welcome)

Requirements

  • Windows 10 / 11 with Windows PowerShell 5.1 (the provided launcher starts PS 5.1 in STA automatically)
  • WebClient service available & enabled (Windows WebDAV mini‑redirector)
  • Nextcloud reachable via HTTPS (connection uses a Nextcloud App Password)

No administrator rights required.


Install & Quick Start

  1. Download the latest ZIP from the repository’s Releases page on github.

  2. Extract the ZIP to a folder in your user profile.

  3. Run installNcDavTray.cmd and 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.

Enjoy!

ernolf

5 Likes

Love it, installed it under installed mode (option 1) and an icon shows in the tray to tell me to open settings with the exclamation mark. However which settings? Nothing shows when right-clicking the icon in the tray what normally provides you with settings.
Had a look into the installed folder, but there is no settings.json file, just the language JSONs.
What am I missing?

Hi @RdedR,

thank you very much for your reply!

Yes. Normaly the settings dialog should open automaticaly on the first run or at least you should become a right-klick-contextmenu with the option to open Setup.

If this persists, even after a restart of windows, could you please open an issue on https://github.com/ernolf/NcDavTray/issues with as much information as possible about your windows version, environment, the role of your windows user etc., since I am not able to reconstruct that behaviour.
There I can ask more specific questions and instructions how to debug. That would be a great help!

ernolf

1 Like

A restart did the trick. Thanks.

The window it opens looks a bit squeezed though:

to help me diagnose the cramped UI layout you’re seeing, please do the following:

  1. Open Windows PowerShell (x64).
  2. Copy-paste the script below into the console and press Enter.
  3. Send me the entire output.
  4. Additionally, please attach two screenshots:
  • Settings → System → Display: the page that shows the Scaling (%) for the monitor where the app window appears (if you have multiple monitors, one screenshot per monitor).
  • Settings → Accessibility → Text size: the percentage value shown there.

No admin rights are needed. The script is read-only and does not change anything.

Thanks!


Script (copy-paste into Windows PowerShell (x64))

# NcDavTray - Font/DPI environment probe (single-block)
# This script is read-only and does not change any settings.

$ErrorActionPreference = 'SilentlyContinue'
Add-Type -AssemblyName System.Drawing

# OS / basic
$os    = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
$arch  = (Get-CimInstance Win32_OperatingSystem).OSArchitecture

# Accessibility / text size & high contrast
$acc   = Get-ItemProperty 'HKCU:\Software\Microsoft\Accessibility'
$hc    = Get-ItemProperty 'HKCU:\Control Panel\Accessibility\HighContrast'
$desk  = Get-ItemProperty 'HKCU:\Control Panel\Desktop'

# Fonts registry & substitutions
$sub   = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes'
$reg   = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts'

# Installed font families (runtime)
$installed = [System.Drawing.Text.InstalledFontCollection]::new().Families | Select-Object -Expand Name

function Get-FontMap([string]$name) {
  if ($sub.PSObject.Properties.Name -contains $name) { "$name => " + $sub.$name } else { "$name => <not set>" }
}
function Get-FontReg([string]$name) {
  if ($reg.PSObject.Properties.Name -contains $name) { $reg.$name } else { "<missing>" }
}

# What WinForms would actually use at runtime
$probeTahoma = (New-Object System.Drawing.Font('Tahoma', 9)).Name
$probeShell2 = (New-Object System.Drawing.Font('MS Shell Dlg 2', 9)).Name

# Tahoma files present on disk (optional)
$tahomaFiles = Get-ChildItem 'C:\Windows\Fonts\tahoma*' -ErrorAction SilentlyContinue |
               Select-Object -Expand Name

$report = [PSCustomObject]@{
  OS_Version              = "$($os.DisplayVersion) (Build $($os.CurrentBuild).$($os.UBR))"
  Edition                 = $os.EditionID
  Architecture            = $arch
  UILanguage_Region       = ((Get-WinSystemLocale).Name + " | " + (Get-Culture).Name)
  Text_Size_Percent       = if ($acc.TextScaleFactor) { "$($acc.TextScaleFactor)%" } else { "100% (default)" }
  HighContrast_Flags      = $hc.Flags
  FontSub_MS_Shell_Dlg    = Get-FontMap 'MS Shell Dlg'
  FontSub_MS_Shell_Dlg_2  = Get-FontMap 'MS Shell Dlg 2'
  FontSub_Tahoma          = Get-FontMap 'Tahoma'
  Reg_Tahoma_Regular      = Get-FontReg 'Tahoma (TrueType)'
  Reg_Tahoma_Bold         = Get-FontReg 'Tahoma Bold (TrueType)'
  Installed_Tahoma        = ($installed -contains 'Tahoma')
  Installed_MSSansSerif   = ($installed -contains 'Microsoft Sans Serif')
  Installed_SegoeUI       = ($installed -contains 'Segoe UI')
  Probe_Tahoma_Runtime    = $probeTahoma
  Probe_ShellDlg2_Runtime = $probeShell2
  Tahoma_FontFiles_OnDisk = if ($tahomaFiles) { ($tahomaFiles -join '; ') } else { "<none found>" }
}

$report | Format-List *

ernolf