Skip navigation

JSI Tip 0364 - How do I get a program to start at high priority from a shortcut and/or association?

The Windows NT Start command can set the priority of a program it initiates. The syntax is:

start \["title"\] \[/dpath\] \[/i\] \[/min\] \[/max\] \[/separate\] \[/low\] \[/normal\] \[/high\] \[/realtime\] \[/wait\] \[/b\] \[filename\] \[parameters\]

 Parameter   D e s c r i p t i o n 
 none   Without any parameters, START opens an additional CMD prompt.  
 "title"   Title to display in the title bar. 
 /dpath   The startup directory. 
 /i   Passes the CMD.EXE startup environment to the new window. 
 /min   Starts minimized. 
 /max   Starts maximized. 
 /separate   Starts 16-bit Windows programs in a separate memory space. 
 /low   Starts the application in the idle priority class. 
 /normal   Starts the application in the normal priority class. 
 /high   Starts the application in the high priority class. 
 /realtime   Starts the application in the realtime priority class. 
 /wait   Starts the application and waits for it to terminate. 
 /b   Does not create a new window.
 CTRL+C handling is ignored unless the application enables CTRL+C processing.
 Use CTRL+BREAK to interrupt the application.
 
 filename   Specifies the command or program to start. 
 parameters   Any parameters to pass to the program or command. 

Using this functionality, we can modify a shortcut to start an application in high priority. To start Microsoft Word in high priority, modify the Target:

CMD.EXE /C "Start /High /B /DC:\MSOFFICE\Winword\ C:\MSOFFICE\Winword\WINWORD.EXE"

Set it's icon back to WinWord.

To modify .doc file associations to open at high priority:

assoc .doc
ftype <string returned from assoc>=CMD.EXE /C
 "Start /High /B /DC:\MSOFFICE\Winword\ C:\MSOFFICE\Winword\WINWORD.EXE %1"

where the above command is on one line.


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish