Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Albirew
Created January 12, 2016 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Albirew/86d8627d8ff95c5fd052 to your computer and use it in GitHub Desktop.
Save Albirew/86d8627d8ff95c5fd052 to your computer and use it in GitHub Desktop.
Allow Basic Authentication with Windows 7 and Windows Vista WebDAV Client
@echo off
:: Allow Windows explorer on Vista and up to use basic auth (for use with 1&1 webdav for example: https://help.1and1.com/hosting-c37630/webspace-and-access-c85098/webdav-c40014/establish-a-webdav-connection-to-your-linux-package-a781732.html )
:: Difference with 1&1 script is that it automatically restart the webclient service for changes to be applied immediately.
echo Windows Registry Editor Version 5.00 >"%Temp%\WebDavBasicAuthLevel.reg"
echo. >>"%Temp%\WebDavBasicAuthLevel.reg"
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters] >>"%Temp%\WebDavBasicAuthLevel.reg"
echo "BasicAuthLevel"=dword:00000002 >>"%Temp%\WebDavBasicAuthLevel.reg"
"%windir%\regedit.exe" /s "%Temp%\WebDavBasicAuthLevel.reg"
net stop webclient
del "%temp%\WebDavBasicAuthLevel.reg"
net start webclient
echo Over, Have a nice Dav.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment