Multiple users cannot print from 32-bit applications on a 64-bit operating system by using the "runas" command (923357)



The information in this article applies to:

  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Datacenter x64 Edition
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Datacenter Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows XP Professional 64-Bit Edition (Itanium) 2003
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Starter
  • Windows Vista Ultimate

Beta Information

This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about how to obtain support for a Beta release, see the documentation that is included with the Beta product files, or check the Web location where you downloaded the release.
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

SYMPTOMS

You cannot use the runas command with different user accounts to print from 32-bit applications on a same computer that has the 64-bit Microsoft Windows operating system installed.

CAUSE

This problem occurs because the system uses the Splwow64.exe process to translate between 32-bit applications and the driver model of the 64-bit operating system. When the Splwow64.exe process has completed, this process remains in memory for a specified time-out period to increase system performance. When you use the runas command to start the 32-bit application, the Splwow64.exe process is only available to the first user until the time-out expires. The time-out value is set by using a registry entry.

WORKAROUND

To work around this problem, use either of the following methods.

Method 1

Avoid using the runas command to print.

Method 2

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Follow these steps to change the registry entry that controls the time-out value:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then right-click the following registry subkey:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print

  3. Point to New, and then click DWORD Value.
  4. Type SplWOW64TimeOut for the registry entry name, and then press Enter.
  5. Double-click the SplWOW64TimeOut entry that you created in step 4.
  6. Enter a value in the Value Data box.

    Note The value that you enter in the Value Data box is the number of minutes that the system will wait until it unloads the Splwow64.exe process. For the time-out to expire more frequently, you can specify a small value. For example, you can enter 1 to indicate that the system will wait one minute before it unloads the Splwow64.exe process.
  7. Click OK.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce the behavior

  1. Run a 32-bit application at a command prompt by using the following command:

    runas /user:user1your32bitapplication

    Note user1 is the user account in which the 32-bit application will run, and your32bitapplication is the name of the 32-bit application that you want to run.
  2. Enter the password for user1 when you are prompted.
  3. Print a document from the 32-bit application that you ran in step 1.
  4. In the context of a different user, run a 32-bit application at a command prompt by using the following command:

    runas /user:user2 your32bitapplication

    Note user2 is a different user account from the one that you specified in step 1, and your32bitapplication is the name of the 32-bit application that you want to run.
  5. Enter the password for user2 when you are prompted.
  6. Print a document from the 32-bit application that you ran in step 4.

    Note Step 6 should fail and reproduce the behavior that is described in this article.

Modification Type:MajorLast Reviewed:8/14/2006
Keywords:kbtshoot kbprb KB923357 kbAudITPRO