Service accessing mapped drive

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a service which is a Windows Service, but it is running under a User
account - I enter my own credentials on installing.
It can access network files by specifying the full UNC path, i.e.
\\server\share, but it can't use mapped drive letters.
Is there anyway I can modify it so that it can?

Thanks
 
In another post I told you that mapped drives are (Logon) session bound.
That means if an interactive user creates a use record (maps a drive), all
programs running in this session will have access to the mapped drive,
however, programs running in another logon session don't have access to
this/these mapped drives.

That means you need to create another use record from within your service.
But, really, I would never ever use a mapped drive, why not simply use a UNC
path?

Willy.
..
 
Well, I had thought that because the service was logging on as me when it
installed (as it is a "User" account installer), it would be able to access
my mapped drives. But since as you say they're session bound, I will just use
a UNC path.
 
Each Logon Session is a separate security context, even if you use the same
credentials. Guess what would happen to your service when the interactive
user logged off effectively closing the session and as such releasing the
mapped drives.

Willy.
 
Back
Top