VB and VBA Users Source Code: Tip: How to run tasks in low priority automatically
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Tip: How to run tasks in low priority automatically
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Tuesday, March 29, 2005
Hits:
1148
Category:
Visual Basic General
Article:
If you find that a process is hogging the CPU, then you can simply lower it's priority. Below is an example of the command line I used to alter one of the processes that archives files on my PC (as found in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\MaxtorOneTouch") "C:\WINDOWS\system32\cmd.exe" /c start "OneTouch" /low "C:\PROGRA~1\Maxtor\OneTouch\Utils\OneTouch.exe" where: /c is a command line parameter to cmd.exe. It "Carries out the command specified by string and then terminates." This is necessary as you do not want cmd.exe running in the background after opening the task. start is actually a program. Try running " start /? ", without quotes, from the command prompt to see all the options. "OneTouch", with quotes, is the title of the task. You can set this to whatever you want. I set it the same as the original task. The /low sets the priority to "low". You can double check this in Windows Task Manager (SHIFT+CTRL+ESC) after you run the task. You could have also used /belownormal to set the priority to "below normal". Note: Some applications can not be changed (Microsoft Word for example) as these applications reset their process priorities.
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder