Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: CPU Priority  (Read 5408 times)

0 Members and 1 Guest are viewing this topic.

Zylstra

    Topic Starter
  • Moderator


  • Hacker

  • The Techinator!
  • Thanked: 45
    • Yes
    • Technology News and Information
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
CPU Priority
« on: September 06, 2007, 05:47:36 PM »
Hello

I am using Windows Vista, and there are two applications in particular that I want to change the CPU priority. Windows Backup, and Defragmenter, as far as I am concerned, run at the regular CPU priority levels.

I read, after Googling, that the only way to change a tasks priority is to manually set them or use a command line parementer with the Start command and a batch file with scheduling (not quite what I want). I also read that you can download programs that will monitor task activity, and will change the CPU priority for you.

Since I have a laptop, my hard drive RPM's aren't the greatest on earth, so, defragmenting slows it down, thus, why I dont currently use the automatic defragment, but I do use backups. How can I make it so that the backup task, and the defragmenter tasks load at a low CPU utilization? (Rather, what is the best way?)

Thanks,
Zylstra

ghostdog74



    Specialist

    Thanked: 27
    Re: CPU Priority
    « Reply #1 on: September 06, 2007, 06:12:35 PM »
    you can set task priority
    Code: [Select]
    Const NORMAL        = 32
    Const IDLE          = 64
    Const HIGH_PRIORITY = 128
    Const REALTIME      = 256
    Const BELOW_NORMAL  = 16384
    Const ABOVE_NORMAL  = 32768
    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
    Set colProcesses = objWMIService.ExecQuery("Select * from Win32_Process Where Name = 'Notepad.exe'")
    For Each objProcess in colProcesses
        objProcess.SetPriority(NORMAL)
    Next
    you will need to find out the process name of windows backup and defragementer