- Admin
- #1
I want to have a simple .bat file to map WebDAV-directories. I would like it to contain two actions:
1) net start WebClient
2) net use z: "https://....." (several of them)
The first action only works when I run the batch file as administrator. The second one then succeeds but the mapped drive is not visible under my account.
So I first have to start the service, and then I can run the batch containing only the "net use" actions under my account.
How can I run both commands under my account? I tried "runas.exe" on the first command, but it did not work, and this does not seem to be not logical.
View the full article
1) net start WebClient
2) net use z: "https://....." (several of them)
The first action only works when I run the batch file as administrator. The second one then succeeds but the mapped drive is not visible under my account.
So I first have to start the service, and then I can run the batch containing only the "net use" actions under my account.
How can I run both commands under my account? I tried "runas.exe" on the first command, but it did not work, and this does not seem to be not logical.
View the full article