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
>
>