Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Process Priority through VBS

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,51910
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Process Priority through VBS
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Process Priority through VBS - 9/17/2007 7:56:01 AM   
  Wyvern


Posts: 11
Score: 0
Joined: 6/21/2007
Status: offline
I am trying to use the basic script designed to change the priority level on running processes, but it fails to do anything to the particular executable I am targeting.  It is a scanning prog created internally where I work to create a report of installed software, service status, etc....

The below script works fine on notepad, and many other processes, but not this particular one.  The process in question has an executable that installs into the system32 folder, but has no unusual permissions. help anyone?

Const BELOW_NORMAL = 16384
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
   ("Select * from Win32_Process Where Name = 'srvany.exe'")
For Each objProcess in colProcesses
   objProcess.SetPriority(BELOW_NORMAL)
Next

_____________________________

With enough bailing wire and duct tape, almost anything is possible.
 
 
Post #: 1
 
 RE: Process Priority through VBS - 9/18/2007 1:54:19 AM   
  Rischip


Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
srvany.exe is a resource kit tool. It allows you to start any application as a service. It does not control the application after it is launched. So setting the priority on this executable won't do anything even if it did work. Look here and look at the registry key to expose the application that is being launched. That is the exe that you want to change the priority on.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to Wyvern)
 
 
Post #: 2
 
 RE: Process Priority through VBS - 9/18/2007 6:20:19 AM   
  Wyvern


Posts: 11
Score: 0
Joined: 6/21/2007
Status: offline



Thanks. 

_____________________________

With enough bailing wire and duct tape, almost anything is possible.

(in reply to Rischip)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Process Priority through VBS Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts