11<#
2- OpenCoperLock — mount your Drive as a Windows network drive over WebDAV.
2+ OpenCoperLock - mount your Drive as a Windows network drive over WebDAV.
33
44 Windows' built-in WebDAV client (the "WebClient" service) needs a few registry tweaks before it
55 behaves, and it mislabels the mount. This script does the whole thing in one shot:
66
77 1. Configures the WebClient service (Basic-over-HTTPS, raises the 50 MB download cap, longer
8- timeout) — this part self-elevates to Administrator.
8+ timeout) - this part self-elevates to Administrator.
99 2. Restarts WebClient so the settings take effect and its "not a WebDAV server" cache is cleared.
1010 3. Maps your Drive to a drive letter (default X:) that reconnects at logon.
1111 4. Gives the drive a proper label instead of Windows' ugly default ("dav").
1212
13- USAGE (right-click the .cmd wrapper → it calls this, or run directly):
13+ USAGE (right-click the .cmd wrapper -> it calls this, or run directly):
1414
1515 powershell -ExecutionPolicy Bypass -File .\mount-opencoperlock-windows.ps1 `
1616 -Server copper.forgenet.fr -Drive X -Token ocl_XXXXXXXX -Label "OpenCoperLock"
1717
18- The token is your PERSONAL API token (Account → API tokens) — an unrestricted one; folder-scoped
18+ The token is your PERSONAL API token (Account -> API tokens) - an unrestricted one; folder-scoped
1919 tokens are refused by WebDAV. If you omit -Token the script prompts for it.
2020
2121 NOTE ON "free space": Windows often shows your LOCAL C: drive's size on a WebDAV mount instead of
22- your account quota. That's a Windows limitation — the server does report the correct quota. Your
22+ your account quota. That's a Windows limitation - the server does report the correct quota. Your
2323 real usage is always shown in the web app.
2424#>
2525[CmdletBinding ()]
@@ -43,7 +43,7 @@ function Test-Admin {
4343 [Security.Principal.WindowsBuiltinRole ]::Administrator)
4444}
4545
46- # ── Phase A: the Administrator-only part (registry + service) ─────────────────────────────────
46+ # -- Phase A: the Administrator-only part (registry + service) ---------------------------------
4747function Set-WebClientConfig {
4848 $p = " HKLM:\SYSTEM\CurrentControlSet\Services\WebClient\Parameters"
4949 Set-ItemProperty $p - Name BasicAuthLevel - Value 2 - Type DWord
@@ -60,7 +60,7 @@ if ($ConfigureOnly) {
6060 return
6161}
6262
63- # ── Phase B: the normal-user part (mapping must NOT run elevated, or Explorer won't see it) ─────
63+ # -- Phase B: the normal-user part (mapping must NOT run elevated, or Explorer won't see it) -----
6464if (-not $Token ) { $Token = Read-Host " Paste your OpenCoperLock API token (ocl_...)" }
6565if (-not $Token ) { throw " No token provided." }
6666
9696}
9797
9898Write-Host " "
99- Write-Host " Done. Your Drive is mounted at $ ( $Drive ) : — open 'This PC'." - ForegroundColor Green
99+ Write-Host " Done. Your Drive is mounted at $ ( $Drive ) : - open 'This PC'." - ForegroundColor Green
100100Write-Host " (Windows may show your local disk size for 'free space'; that's a Windows quirk, not your real quota.)" - ForegroundColor DarkGray
0 commit comments