Webdav Drive not accessable

Started by kerdweg, December 11, 2020, 05:55:05 AM

Previous topic - Next topic

kerdweg

I try to read data from drive, connected via webdav.

But I always get th error "1028 Logdisk: Angefordertes Laufwerk ist nicht Online".

Can anybody help me what to do?

ChuckC

Are you able to open a console window [CMD.EXE] and successfully use the DIR command get a directory listing of the WebDAV drive?

IIRC, not all WebDAV support is implemented as a network provider and exists solely within the Windows Explorer shell as a shell extension.  If that's what you have, then WinBatch is very likely not going to be able to interact with it.

If your WebDAV support is implemented as a network provider and you have a drive letter mapped to it, then please confirm what your UAC settings are and whether the drive letter is being mapped by a process using the "restricted" access token while your script is running using the "elevated" access token such that it cannot see the mapped drive.  By default, the "restricted" and "elevated" access tokens have separate mapped network drives that are not visible across the boundary imposed by UAC.  There is a registry setting you can enable that permits the sharing of network drives between the "restricted" and "elevated" access tokens.


kerdweg

Thanks for your fast answer.
I am able to open a console and access the mapped drive letter within this command line.
The DIR command lists me the content.

I don't really understand how to enable winbatch to see the mapped network drive with the access token.
What do I have to do?
Is the only way to set a registry key? And what key do I have to set?


td

This issue is covered in the Tech Database and no you don't have to set a registry key.  Assuming that the access token is the issue (it almost always is with mapped drives), you can run your WinBatch script as a restricted Admin (asInvoker) or map the drive using an Elevated admin process. 

Tech DB articles

Mapped drive issue:
https://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/UAC+Mapped~Drives~Issue~with~UAC.txt

Running under UAC:
https://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+~+Run~Scripts~on~Windows~Vista~and~Newer.txt
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

Discovered something new... I may be the only person that visits this forum that didn't know it but Windows 10 has built-in support for mapping drives using the Webdav protocol.   
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

ChuckC

yeah, somewhere along the way WebDAV support went from a very thin shell-extension purely usable within the Windows Explorer for drag-n-drop that simply moved files between local & remote storage to being an actual network provider like the SMB/CIFS client.

nifty, huh?

td

A closer examination of any underlying APIs that support that feature is in order...
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

There appears to be a set of Win32 functions in Vista and new versions of Windows.  The API is exported by the Netapi32 dll. Cool.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

ChuckC

I think that the point where I tripped and discovered the WebDAV support was when enumerating network drives and the possible types were SMB/CIFS, NFS and WebDAV.

kerdweg

Many thanks for these informations.
Running Winbatch as Invoker=false (WBStudio_IF.exe) solves my problems in the easiest way.