Microsoft KB Archive/110853

{|
 * width="100%"|

PRB: Can't Increase Process Priority

 * }

Q110853

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * the operating system: Microsoft Windows NT, versions 3.5, 4.0
 * the operating system: Microsoft Windows 2000

-

SYMPTOMS
An attempt to increase process priority to the real-time priority REALTIME_PRIORITY_CLASS may not set the PriorityClass to the expected level.

CAUSE
Only accounts with the "Increase Scheduling Priority" permission can increase the priority to real-time. Only Administrators and "Power Users" have this permission by default.

RESOLUTION
Either run the program from an Administrator or Power User account, or grant the Increase Scheduling Priority permission to any user group that must run the program.

STATUS
This behavior is by design.

MORE INFORMATION
The Increase Scheduling Priority permission can be granted by an administrator to a user or group through the User Manager. To do this follow the steps below for your version of Windows NT:

Windows NT version 3.5 or 3.51:


 * 1) Open the "Administrative Tools" group in Program Manager.
 * 2) Run the User Manager application.
 * 3) Choose User Rights from the Policies menu.
 * 4) Select the Show Advanced User Rights check box.
 * 5) Select Increase Scheduling Priority from the drop-down list box.
 * 6) Choose the Add button to add users or groups to the list of entities that have this right.

Windows NT 4.0


 * 1) Open the "Administrative Tools" item under the "Programs" item in the Start Menu.
 * 2) Run the User Manager application.
 * 3) Choose User Rights from the Policies menu.
 * 4) Select the Show Advanced User Rights check box.
 * 5) Select Increase Scheduling Priority from the drop-down list box.
 * 6) Choose the Add button to add users or groups to the list of entities that have this right.

Windows 2000:


 * 1) Open the Administrative Tools menu under the "Programs" item in the Start Menu.
 * 2) Choose "Local Security Policy" in the Administrative Tools menu.
 * 3) In the left-pane, choose "User Rights Assignment".
 * 4) In the pane to the right, double-click "Increase scheduling priority".
 * 5) Click Add to add users or groups to the list of entities that have this right.

Note that the call to SetPriorityClass may return success even though the priority was not set to REALTIME_PRIORITY_CLASS, because if you don't have the Increase Scheduling Priority permission, a request for REALTIME_PRIORITY_CLASS is interpreted as a request for the highest priority class allowed in the current account. If it is important to know the actual priority class that was set, use the GetPriorityClass function.

Additional query words: 3.50 SetPriorityClass GetPriorityClass

Keywords : kbKernBase kbOSWin2000 kbThread kbDSupport kbGrpDSKernBase

Issue type : kbprb

Technology : kbAudDeveloper kbWin32sSearch kbWin32API