Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download - Clean, repair and optimize your system



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner 2009 - Free Scan Now

Change Process Base Priority?

microsoft.public.windows.vista.general




Recommended Fix - Fix Vista Errors and Optimize Performance

Click On Your Flag for Translation
Simplified Chinese French Spanish Italian Portugeuse Japanese German Dutch
Driver Scanner 2009 - Free Scan Now
Reply
  #1 (permalink)  
Old 02-06-2008
Julian
 

Posts: n/a
Change Process Base Priority?
[Vista HP]
With Windows task Manager "Run As Administrator" one can change the base
priority of a process...

I have one application that starts with "Below Normal" priority, which is a
pain in the neck when the virus scanner is active; manually changing the
priority to Normal restores acceptable performance

Q: Is there any way (batch file, registry edit, other) to automatically set
the Base Priority at application startup?

TIA

Julian
--
Julian I-Do-Stuff

Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-09-2008
JohnBuk [MSFT]
 

Posts: n/a
RE: Change Process Base Priority?
Yes, save the following snippit as startnormal.vbs. Change out NORMAL with
ABOVE_NORMAL to test with calc.exe.

--
' Title: Start a Process with a Base Priority
' References:
http://www.microsoft.com/technet/scr....mspx?mfr=true
'
' Instructions: Change strProcessName to the name of the executable

Const strProcessName = "calc.exe"

Const NORMAL = 32
Const BELOW_NORMAL = 16384
Const ABOVE_NORMAL = 32768

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")

Set objConfig = objStartup.SpawnInstance_
objConfig.PriorityClass = NORMAL

errReturn = objProcess.Create(strProcessName, null, objConfig, intProcessID)
--

John

--
Speaking for myself only.
This posting is provided "AS IS" with no warranties, and confers no rights.
--


"Julian" wrote:

> [Vista HP]
> With Windows task Manager "Run As Administrator" one can change the base
> priority of a process...
>
> I have one application that starts with "Below Normal" priority, which is a
> pain in the neck when the virus scanner is active; manually changing the
> priority to Normal restores acceptable performance
>
> Q: Is there any way (batch file, registry edit, other) to automatically set
> the Base Priority at application startup?
>
> TIA
>
> Julian
> --
> Julian I-Do-Stuff
>
> Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-09-2008
Julian
 

Posts: n/a
Re: Change Process Base Priority?
Haven't tried it yet but can see no reason to doubt it! Perfect! Thank you
very much...

Not only a statement of principle but a worked example - A+ answer!!

Don't suppose you know how to resolve the "Access denied" error when
attempting to start the Windows Event Log Service (which failed to start on
its own) do you...>

Thanks!

--
Julian I-Do-Stuff

Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
"JohnBuk [MSFT]" <johnbuk@online.microsoft.com> wrote in message
news:7B844419-030E-4BAE-83AE-5743FC8B4EE5@microsoft.com...
> Yes, save the following snippit as startnormal.vbs. Change out NORMAL
> with
> ABOVE_NORMAL to test with calc.exe.
>
> --
> ' Title: Start a Process with a Base Priority
> ' References:
> http://www.microsoft.com/technet/scr....mspx?mfr=true
> '
> ' Instructions: Change strProcessName to the name of the executable
>
> Const strProcessName = "calc.exe"
>
> Const NORMAL = 32
> Const BELOW_NORMAL = 16384
> Const ABOVE_NORMAL = 32768
>
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set objStartup = objWMIService.Get("Win32_ProcessStartup")
> Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
>
> Set objConfig = objStartup.SpawnInstance_
> objConfig.PriorityClass = NORMAL
>
> errReturn = objProcess.Create(strProcessName, null, objConfig,
> intProcessID)
> --
>
> John
>
> --
> Speaking for myself only.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> --
>
>
> "Julian" wrote:
>
>> [Vista HP]
>> With Windows task Manager "Run As Administrator" one can change the base
>> priority of a process...
>>
>> I have one application that starts with "Below Normal" priority, which is
>> a
>> pain in the neck when the virus scanner is active; manually changing the
>> priority to Normal restores acceptable performance
>>
>> Q: Is there any way (batch file, registry edit, other) to automatically
>> set
>> the Base Priority at application startup?
>>
>> TIA
>>
>> Julian
>> --
>> Julian I-Do-Stuff
>>
>> Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
>>
>>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-09-2008
JohnBuk [MSFT]
 

Posts: n/a
Re: Change Process Base Priority?
The usual suspects are the registry settings or the file permissions.
You could use Process Monitor and see if you find an status Access Denieds
in it why trying to start the service.

http://technet.microsoft.com/en-us/s.../bb896645.aspx

You could also check the permissions on the files themselves.
Start a command prompt as administrator and repeat for each evtx file.

cd %SystemRoot%\System32\Winevt\Logs
cacls system.evtx

If it doesn't look like this, then it's been modified from the default.

C:\Windows\System32\winevt\Logs\System.evtx
NT SERVICE\EventlogID)F
NT AUTHORITY\SYSTEMID)F
BUILTIN\AdministratorsID)F

However, there could be other files locations that are in correct as well
like.
C:\Windows\ServiceProfiles\LocalService\AppData\Lo cal


If the permissions are incorrect, you could change it back manually or use
the command in this KB article.

How to reset security settings back to the defaults
http://support.microsoft.com/kb/313222

Good Luck,

John
--
Speaking for myself only.
This posting is provided "AS IS" with no warranties, and confers no rights.
--


"Julian" wrote:

> Haven't tried it yet but can see no reason to doubt it! Perfect! Thank you
> very much...
>
> Not only a statement of principle but a worked example - A+ answer!!
>
> Don't suppose you know how to resolve the "Access denied" error when
> attempting to start the Windows Event Log Service (which failed to start on
> its own) do you...>
>
> Thanks!
>
> --
> Julian I-Do-Stuff
>
> Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
> "JohnBuk [MSFT]" <johnbuk@online.microsoft.com> wrote in message
> news:7B844419-030E-4BAE-83AE-5743FC8B4EE5@microsoft.com...
> > Yes, save the following snippit as startnormal.vbs. Change out NORMAL
> > with
> > ABOVE_NORMAL to test with calc.exe.
> >
> > --
> > ' Title: Start a Process with a Base Priority
> > ' References:
> > http://www.microsoft.com/technet/scr....mspx?mfr=true
> > '
> > ' Instructions: Change strProcessName to the name of the executable
> >
> > Const strProcessName = "calc.exe"
> >
> > Const NORMAL = 32
> > Const BELOW_NORMAL = 16384
> > Const ABOVE_NORMAL = 32768
> >
> > strComputer = "."
> > Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> > Set objStartup = objWMIService.Get("Win32_ProcessStartup")
> > Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
> >
> > Set objConfig = objStartup.SpawnInstance_
> > objConfig.PriorityClass = NORMAL
> >
> > errReturn = objProcess.Create(strProcessName, null, objConfig,
> > intProcessID)
> > --
> >
> > John
> >
> > --
> > Speaking for myself only.
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > --
> >
> >
> > "Julian" wrote:
> >
> >> [Vista HP]
> >> With Windows task Manager "Run As Administrator" one can change the base
> >> priority of a process...
> >>
> >> I have one application that starts with "Below Normal" priority, which is
> >> a
> >> pain in the neck when the virus scanner is active; manually changing the
> >> priority to Normal restores acceptable performance
> >>
> >> Q: Is there any way (batch file, registry edit, other) to automatically
> >> set
> >> the Base Priority at application startup?
> >>
> >> TIA
> >>
> >> Julian
> >> --
> >> Julian I-Do-Stuff
> >>
> >> Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
> >>
> >>

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRIORITY CHANGE? RetroMIDI microsoft.public.windows.vista.general 2 11-14-2007 01:23
Indexer--how to change priority David microsoft.public.windows.vista.general 9 08-22-2007 04:25
PIN Change on Windows Vista with MS Base CSP Moshe100 microsoft.public.windows.vista.security 1 08-01-2007 07:46
Setting base priority persistently or shortcut GregcGen microsoft.public.windows.vista.performance maintenance 3 05-26-2007 12:09
Microsoft should consider change in patching process Steve Security News 0 04-10-2007 02:35




All times are GMT +1. The time now is 12:54.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com and Win7Heads.com.


Funny Commercials to make you laugh :-)

Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119