PRB: After CreateService() with UNC Name, Service Start Fails (127862)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 3.5
- the operating system: Microsoft Windows NT 3.51
- the operating system: Microsoft Windows NT 4.0
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows XP
This article was previously published under Q127862 SYMPTOMS
When giving a Universal Naming Convention (UNC) name to CreateService(),
the call succeeds, but the service start fails with ERROR_ACCESSS_DENIED
(5). This error will only occur if the service is specified to run in the
LocalSystem account.
CAUSE
The Service Control Manager calls CreateProcess() to start the service. If
the service is specified to run in a user account, the Service Control
Manager impersonates the user before calling CreateProcess(). If the
service is specified to run in the LocalSystem account, the Service Control
Manager runs in the LocalSystem security context. When you call
CreateProcess() with a UNC name from a process running in the LocalSystem
context, you get ERROR_ACCESS_DENIED. This is because LocalSystem has
restricted (less than guest) access to remote machines. A null session is
set up for LocalSystem remote access, which has reduced rights.
RESOLUTION
There are three possible solutions:
Modification Type: | Major | Last Reviewed: | 3/16/2004 |
---|
Keywords: | kbKernBase kbprb kbService KB127862 |
---|
|