"ERROR_BAD_PATHNAME" error message when you create a global object on a Windows 2000 Advanced Server terminal server session (830781)



The information in this article applies to:

  • Microsoft Windows 2000 Advanced Server

SYMPTOMS

When you use the "Run As" feature to run a program that calls the Create*() API to create a global object on a Microsoft Windows 2000 Advanced Server Service Pack 4 (SP4) terminal server session, the global object creation fails and you receive the following error message:
ERROR_BAD_PATHNAME

CAUSE

This problem occurs because of the introduction of a new feature that helps to enhance security by locking down sessions in Windows 2000 Advanced Server SP4 and later versions. Symlinks and sections cannot be created unless a user has the correct permissions. This feature was added in Windows 2000 Advanced Server SP4.

WORKAROUND

To work around this problem, use one of the following methods:
  • Revert the session lock down feature back to SP3 mode. To do this, create the following subkey in the registry and set the value to 0 (zero):
    1. Start Registry Editor.

      To do this, click Start, click Run, type regedit in the Open box, and then click OK.
    2. Locate and then click the following subkey:

      HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager

    3. On the Edit menu, point to New, click DWORD Value, and then type ObjectSecurityMode.
    4. Double-click ObjectSecurityMode and verify that the Value data is 0 (zero).
  • Run the "Run As" feature from the Terminal Server console, instead of from a remote session.

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:3/29/2004
Keywords:kberrmsg kbprb kbfix KB830781 kbAudITPRO