Samstag, 17. April 2010

[BATCH] Set Process Priority

Um ein Programm per Batch mit einer bestimmbaren Prozesspriorität zu starten (z.B. LOW oder HIGH) kann das Commandline-Tool "start" genutzt werden.
Dieses startet den angegebenen Befehl parallel in einem Extraprozess (Fenster) mit einstellbarer Priorität.
Der Aufruf von
start /LOW /MIN myBatch.bat
startet beispielsweise das Batchscript "myBatch.bat" als Prozess der Priorität "LOW" in einem neuen, minimierten Kommandozeilenfenster. "IDLE" als Process-Prioritäts-Vorwahl steht leider nicht zur Verfügung.

Wer also seine Datei myBatch.bat mit einstellbarer Priorität starten will, kann also einfach ein weiteres Batch-Script "start_myBatch.bat" anlegen, welche den obigen Aufruf enthält.

Hier noch die Optionen des Befehls "start":
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/WAIT] [/B] [command/program]
      [parameters]

    "title"     Title to display in  window title bar.
    path        Starting directory
    B           Start application without creating a new window. The
                application has ^C handling ignored. Unless the application
                enables ^C processing, ^Break is the only way to interrupt
                the application
    I           The new environment will be the original environment passed
                to the cmd.exe and not the current environment.
    MIN         Start window minimized
    MAX         Start window maximized
    SEPARATE    Start 16-bit Windows program in separate memory space
    SHARED      Start 16-bit Windows program in shared memory space
    LOW         Start application in the IDLE priority class
    NORMAL      Start application in the NORMAL priority class
    HIGH        Start application in the HIGH priority class
    REALTIME    Start application in the REALTIME priority class
    ABOVENORMAL Start application in the ABOVENORMAL priority class
    BELOWNORMAL Start application in the BELOWNORMAL priority class
    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
                or a console application.

    parameters  These are the parameters passed to the command/program

Suche

 

Aktuelle Beiträge

Anleitung Dieselheizung...
Den beliebten Dieselheizungen aus chinesischer Produktion...
techomatic - 2022-11-13 00:35
Reifendruckkontrolle...
Wenn die Reifendruckkontrollleuchte (Toyota Yaris III)...
techomatic - 2022-10-23 13:58
openSSH-Keys mit Putty(gen)...
Ziel: openSSH-Keypaare unter Windows erzeugen Problem: Putty.. .
techomatic - 2021-02-20 13:59
mp4-Videos mit Virtualdub...
Für Virtualdub gibt es einen sehr guten Entwackler...
techomatic - 2018-11-03 21:26
[SMB] XP WIN7 WIN10 Login...
Wer beim Versuch auf Windows-Freigaben eines XP-Rechners...
techomatic - 2018-05-04 22:04

Credits

powered by Antville powered by Helma


xml version of this page

twoday.net AGB

click tracking

Status

Online seit 5915 Tagen
Zuletzt aktualisiert: 2022-11-17 19:10

System