2
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"
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 gotsrvany.exe
from). If the application can work with UNC paths I'd try what @Matthias suggests. – LawrenceC – 2013-03-25T01:56:08.123