Re: Map a network drive in win32 service program before user logon.
- From: "Eugene Gershnik" <gershnik@xxxxxxxxxxx>
- Date: Thu, 1 Sep 2005 00:05:31 -0700
codexman wrote:
> To MVPs & professionals,
>
> We write a win32 service program using c++. When Service starts, it
> will create a thread to read files from a share folder of the other
> server, such as \\serverx\sharefolder\*.*. There are 3 problems,
> (1) When the service is running under LocalSystem account, why it can
> not access share folder on XP / 2003 server or 2000 server using
> FindFirst()?
Becuase LocalSystem account usually doesn't have network credentials. Use
NetworkService or designated user instead.
> (2) We change the account to administrator, service can access the
> share folder on 2000 server / 2003 server. But, service still can not
> use FindFirst() to read files from XP's sharefolder. (all
> sharefolders have granted to Guest account)
Check NTFS permissions on the folder. Both share permissions and NTFS
permissions must grant the access.
> (3) We try to use WNetUseConnection() in our service program, it
> seems can solve the problem, but our service will crash after several
> hours.
Fix the bugs.
--
Eugene
http://www.gershnik.com
.
- References:
- Prev by Date: RE: VPN - IPSEC ??
- Next by Date: Re: Changing Local User Dial-in Properties
- Previous by thread: RE: Map a network drive in win32 service program before user logon.
- Index(es):
Relevant Pages
|