Trying to edit a batch file to run with a higher CPU priority

Rehan

New member
Local time
9:23 PM
Messages
1
Hi guys,

Long time reader, first time poster.

I have a batch file, named lima.bat which has the following code in it:

Code:
del *.bin
setx GPU_MAX_ALLOC_PERCENT 100
setx GPU_USE_SYNC_OBJECTS 1
color 02
C:\Users\user\Desktop\MineIt\cgminer.exe  --config C:\Users\user\Dropbox\Lima\gigabyte-gold.conf

Currently this works perfectly, all *.bin files are deleted, the two environment variables (lines 2 and 3) are set, and then the window color is set before the cgminer.exe begins. cgminer.exe runs inside the command prompt window.

Now what I am trying to do (and failing at) is make it so that the cgminer.exe runs at higher CPU priority. I am trying to make it run at "ABOVENORMAL" or "HIGH" priority but am not sure how to make that happen and also keep the window color.

Could anyone assist please? Thank you very much!
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Pro x64
CPU
Intel i7 3770K
Motherboard
Gigabyte Z77-UD3H
Memory
4x8GB DDR3
Graphics Card(s)
Gigabyte R9 280x Windforce
Hard Drives
Samsung 840 Pro 128GB
WD Caviar Black 1TB
Browser
Chrome
Hi,

IIRC, the CPU priority can be set from the START command.. Here is the help text..

Code:
C:\Users\Tanya>help start
Starts a separate window to run a specified program or command.

START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
      [command/program] [parameters]

  ...
    LOW         Start application in the IDLE priority class.
    NORMAL      Start application in the NORMAL priority class.
   [B] HIGH        Start application in the HIGH priority class.[/B]
    REALTIME    Start application in the REALTIME priority class.
    ABOVENORMAL Start application in the ABOVENORMAL priority class.
    BELOWNORMAL Start application in the BELOWNORMAL priority class.
    NODE        Specifies the preferred Non-Uniform Memory Architecture (NUMA)
                node as a decimal integer.
    AFFINITY    Specifies the processor affinity mask as a hexadecimal number.
                The process is restricted to running on these processors.

                The affinity mask is interpreted differently when /AFFINITY and
                /NODE are combined.  Specify the affinity mask as if the NUMA
                node's processor mask is right shifted to begin at bit zero.
                The process is restricted to running on those processors in
                common between the specified affinity mask and the NUMA node.
                If no processors are in common, the process is restricted to
                running on the specified NUMA node.
    WAIT        Start application and wait for it to terminate.
    command/program
                If it is an internal cmd command or a batch file then
                the command processor is run with the /K switch to cmd.exe.
                This means that the window will remain after the command
                has been run.

                If it is not an internal cmd command or batch file then
                it is a program and will run as either a windowed application
Press any key to continue . . .
Given that, you need to prefix the command to run cgminer.exe with the start command...

START "CGMINER" /HIGH "C:\Users\user\Desktop\MineIt\cgminer.exe --config C:\Users\user\Dropbox\Lima\gigabyte-gold.conf"

It's been a loooong time since I used this.. so hopefully I've remembered it correctly, but I've not used it in conjunction with the color command, so I can't comment on that. Fingers crossed :)

hth
Tanya
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Made
OS
Linux Mint 17 Cinnamon | Win 7 Ult x64
CPU
Intel I7-3770K @ 4.2ghz
Motherboard
ASRock Extreme 4
Memory
32GB G-Skill C10Q
Graphics Card(s)
EVGA GTX 670 2GB SC
Sound Card
Creative Fatality ExtremeGamer
Monitor(s) Displays
LG E2742V x 2
Screen Resolution
1920x1080
Hard Drives
256GB Vertex 4 SSD
2TB Seagate ST2000DM001
1TB Seagate ST1000DM003
PSU
Corsair HX 650
Case
HAF 932 advanced
Cooling
Corsair H100i liquid cooler
Keyboard
Logitech Wireless
Mouse
Logitech Wireless
Internet Speed
OptusNet NBN 100/40
Antivirus
Malwarebytes
Browser
Firefox 30
Other Info
Router: Sagemcom F@st 3846 Crippled by Optus.
Back
Top