Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I created a service via srvany.exe like decribed here. This application needs access to a mapped network drive. I manually mapped this drive as local Administrator, but my application/service does not have access to it.

I tried to start the service with the local Administrator credentials. But neither, the default System-Account nor the local Administrator seem to have access to the network.

If I manually start the application using the local Administrator account, the application has access to the network.

What do I have to configure, that my service can access a mapped network folder?

Edit:
I wrote a small batch file similar to the following and edited the registry that the service starts the batch instead of the exe. So I tried to map and run the exe with the same credentials. But it still failes:

net use V: /DELETE
net use V: \\Server\Folder\Folder /user:UserName password /PERSISTENT:YES
"C:\Program Files\MyApplication\MyApplication.exe"
share|improve this question
    
Mapping a drive non-interactively may need the account to have a right that it doesn't normally have (look at ntrights.exe from the same resource kit you got srvany.exe from). If the application can work with UNC paths I'd try what @Matthias suggests. –  ultrasawblade Mar 25 '13 at 1:56

1 Answer 1

I found a similar question on serverfault.
I gave up to map the share and configured my application to directly access the path (\\Server\Folder...). Then I started the service using a domain account that has access to that shared folder.
As far as I read at various web sides, there seems to be a difference between the logged on user and a service. A mapped network folder by the logged on user is not mapped for "another" user like a service, even if the service runs with the same credentials as the logged on user.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.