Connecting Tech Pros Worldwide Forums | Help | Site Map

Service accessing mapped drive

Bonj
Guest
 
Posts: n/a
#1: Nov 16 '05
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



Willy Denoyette [MVP]
Guest
 
Posts: n/a
#2: Nov 16 '05

re: Service accessing mapped drive


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.
..
"Bonj" <Bonj@discussions.microsoft.com> wrote in message
news:89D07DFD-44EE-4E1A-941D-63D1835F4BF1@microsoft.com...[color=blue]
>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[/color]


Bonj
Guest
 
Posts: n/a
#3: Nov 16 '05

re: Service accessing mapped drive


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.

"Willy Denoyette [MVP]" wrote:
[color=blue]
> 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.
> ..
> "Bonj" <Bonj@discussions.microsoft.com> wrote in message
> news:89D07DFD-44EE-4E1A-941D-63D1835F4BF1@microsoft.com...[color=green]
> >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[/color]
>
>
>[/color]
Willy Denoyette [MVP]
Guest
 
Posts: n/a
#4: Nov 16 '05

re: Service accessing mapped drive


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.

"Bonj" <Bonj@discussions.microsoft.com> wrote in message
news:6F31A3F7-A808-4207-A608-7643914198F3@microsoft.com...[color=blue]
> 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.
>
> "Willy Denoyette [MVP]" wrote:
>[color=green]
>> 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.
>> ..
>> "Bonj" <Bonj@discussions.microsoft.com> wrote in message
>> news:89D07DFD-44EE-4E1A-941D-63D1835F4BF1@microsoft.com...[color=darkred]
>> >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[/color]
>>
>>
>>[/color][/color]


Closed Thread