You cannot use the runas command to print from a 32-bit program in different user accounts in a single session on a computer that is running a 64-bit version of Windows Server 2003

Article translations Article translations
Close Close
Article ID: 923357 - View products that this article applies to.
Expand all | Collapse all

On This Page

Symptoms

On a computer that is running a 64-bit version of Windows Server 2003, you cannot use the runas command to print from a 32-bit program in different user accounts in a single session.

Cause

This behavior occurs because the system uses the Splwow64.exe process to translate between 32-bit programs and the driver model of the 64-bit operating system. When the Splwow64.exe process is complete, 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 program, the Splwow64.exe process is available only to the first user until the specified period passes. This period is set by using a registry entry.

Workaround

To work around this behavior, use one of the following methods.

Method 1

Avoid using the runas command to print.

Method 2

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
To change the registry entry that controls the time-out period, follow these steps:
  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 as 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, and then click OK.

    The value that you enter in the Value Data box is the number of minutes that the system waits to unload the Splwow64.exe process. This period starts after the last 32-bit process prints and closes. Therefore, when a service process prints, the print capability is not released until the service closes and the time that you specify passes. For example, if you type 1 in the Value data box, and the last 32-bit process takes two minutes to print and close, the print capability is released after three minutes.

Status

This behavior is by design.

More information

On a computer that is running a 64-bit version of Microsoft Windows, only one user account may print from a 32-bit program in a session. In a session, the user account that prints first is the only user account in which a 32-bit process can print until a time-out occurs or the session ends. If another user account in the same session tries to print before the session ends, the user account receives an "Invalid Handle" error message. Additionally, the print request is unsuccessful.

More than one process may run in different user accounts in the same session. Examples include the following:
  • Service processes that run in the same session. (However, the user accounts that run the service processes are determined by the service settings.)
  • Processes that are initiated by using the runas command.
After a print job finishes, the Splwow64.exe process continues to run in the user account in which the print job ran. Periodically, the system checks to see whether any processes remain connected to the Splwow64.exe process. During this period, if no processes are connected to the Splwow64.exe process, the Splwow64.exe process shuts down. After the Splwow64.exe process shuts down, another user account can start a new Splwow64.exe process and print. By default, this period takes two minutes. Therefore, after the last process in one user account prints and closes, other user accounts may print after two to four minutes.

For more information about a similar issue in Windows Vista and in Windows Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
972616 You cannot use the "runas" command to print from different user accounts in a single session from a 32-bit program on a computer that is running 64-bit version of Windows Server 2008 or Windows Vista

Properties

Article ID: 923357 - Last Review: July 31, 2012 - Revision: 2.0
Applies to
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Datacenter x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems
Keywords: 
kbtshoot kbprb KB923357

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com