WebDAV on Windows Vista & Windows 7

There are quite a number of tales of woe around that topic. I had to find that out when I experienced some trouble myself today. If you’re in the same situation skip right down to the last two lines of this posting, the stuff in between just details the problem to associate the solution to the problem for the search engines.

My intention was to connect to my freshly set up  WebDAV directory served by Apache. The setup on the server side was quite tedious as well, but as expected, there are countless howtos around and one just has to put the pieces together as usual. The real problem however arose, when I starry-eyed tried to connect to that online directory using Vista’s „Map Network Drive …“ dialog. After some steps into the wizard that always gave me the error popup saying „The folder you entered does not appear to be valid“.

Well that soon let me drop to the beloved command line. But using net use W: https://example.com/davroot was answered by „System error 67 has occurred“ and „The network name cannot be found“. Using net use W: \\example.com@SSL\davroot gave no improvement.

I will spare you my other trials and all the different possible solutions that can be found on the net (I even installed a Microsoft patch which didn’t change anything) and write down straight what solved the problem:

  1. Make sure the „WebClient“ service is running! (Type „services.msc“ into the search box in the start menu and hit enter.  Scroll down the WebClient and check.)
  2. Use „\\yourserver@SSL\DavWWWRoot\yourshare“ as the server address in the Folder field of the Map Network Drive dialog box. Do not forget the DavWWWRoot or the @SSL.  

Sicherung eines Netzwerkpfades unter Windows Vista

Ich weiß, dass es für gewöhnlich umgekehrt ist, aber ich stand vor dem Problem, dass ich auf einer zentral verwalteten Maschine mit einem Benutzerkonto auf einem DFS-Server die dort abgelegten Daten gerne lokal gesichert hätte. Der Grund dafür war in erster Linie mein Misstrauen gegenüber der Verfügbarkeit der Netzwerkverbindung. Ich wollte auch an Tagen, an denen es Netzwerkprobleme gab, mit meinen Daten ungestört weiterarbeiten können (ohne mich auf die Vista-eigenen Offline Mechanismen verlassen zu müssen).

Das folgende Skript erfüllt genau diese Aufgabe und ist auch leicht per Taskplaner zu automatisieren. Um es einzusetzen, müssen nur die Einstellungen in Zeile 3 bis 6 angepasst werden und dafür gesorgt sein, dass 7-zip installiert ist.

@echo off

set source=\\cern.ch\dfs\Users\f\fmoser
set destination=D:\fmoser\Backup
set prefix=fmoser_
set szip="C:\Program Files (x86)\7-Zip\7z.exe"

For /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
set backupname=%destination%\%prefix%%mydate%_%mytime%
mkdir %backupname%
robocopy %source% %backupname% /MIR /Z /R:10 /W:30 /COPY:DATSO /XJ /LOG:%backupname%.log /NP
%szip% a -t7z -mx9 %backupname%.7z %backupname% %backupname%.log && rd /S /Q %backupname% && del %backupname%.log

backup_dfs.cmd