none
WXP_PRO_SP2:running service with user defined priority

    Question

  • I have a serious problem! I want to run a service with defined priority level (preferably at start of Windows). My OS is Windows XP Pro SP2 full updated.

    My experiences:

    START ... - don´t work for services

    NET START /LOW service - don´t work

    Thank´s...

    Wednesday, October 11, 2006 9:16 AM

Answers

  • First make sure that service is running, if it is not running do the following:
    go to Control panel >Administrative tools>Services

    double click a service you want to start automatically
    under startup type select manual and make sure the service status is set to start or click the start button.

    if the service is not started automatically next time when the windows start ,
    repeat the above steps now instead of selecting manual in startup type select automatic

    hope this works...

    Defining a manual priority for a service:
    you can do this easily by using a software called WinTask Pro
    download it form here http://www.liutilities.com/products/wintasksstd/
    Saturday, February 10, 2007 10:02 AM

All replies

  • Could you give me some more specific information about this problem? What service are you trying to run?

    Thanks.

    Monday, February 05, 2007 6:26 PM
  • become an admin and try implementing local sec policies

     

    Wednesday, February 07, 2007 11:30 PM
  • First make sure that service is running, if it is not running do the following:
    go to Control panel >Administrative tools>Services

    double click a service you want to start automatically
    under startup type select manual and make sure the service status is set to start or click the start button.

    if the service is not started automatically next time when the windows start ,
    repeat the above steps now instead of selecting manual in startup type select automatic

    hope this works...

    Defining a manual priority for a service:
    you can do this easily by using a software called WinTask Pro
    download it form here http://www.liutilities.com/products/wintasksstd/
    Saturday, February 10, 2007 10:02 AM
  • ucan start a windows service by administrative services window.u can invokke this window very fast manor my just typing services.msc in the run window.here all services registered will be available and u can say automatic means start always.manual means start if invoked.disable means never start.and u can set priority in windows task manager right click options.
        if u want to do this automatically then save the
     this code in a *.vbs format and run it from the command line like so:

    c:\>wscript whateverYouNameIt.vbs
    and u can do this at start time by adding just a shortcut to file in the startup folder of windows located at start>all programs>startup.



    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' If a particular process is running, will change its priority to whatever
    ' the constant PRIORITY_LEVEL is set at. If you want to change which service
    ' this script looks for, change the strProcess variable to the name of the
    ' process it is associated with.
    '
    ' Priority Level Values:
    ' - Normal 32
    ' - Low 64
    ' - Realtime 128
    ' - High 256
    ' - Below Normal 16384
    ' - Above Normal 32768
    '
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    'Set vars
    Const PRIORITY_LEVEL = 256
    Const PROCESS = "spoolsv.exe"
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")

    'Search for process, if it's running, update priority
    Do
    Set colProcesses = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = '" & PROCESS & "'")
    For Each objProcess in colProcesses
    objProcess.SetPriority(PRIORITY_LEVEL)
    Next
    Loop While 1

    Monday, April 23, 2007 5:23 PM
  • As described here:
    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/1d1390e3-1727-42b6-aac7-197167b4d5a1

    To set priority on other users' threads, you need the debug privilege:

    Set objWMIService = GetObject("winmgmts:" _
        & "{impersonationLevel=impersonate , (Debug)}!\\" & strComputer & "\root\cimv2")

    Also, I'm not sure how practical that busy wait loop is. I got rid of the loop and just let the process run once at startup. If it happens that my startup processes aren't running after service startup, I'll add a delay.

    Monday, November 12, 2012 4:59 PM