Guest n o s p a m p l e a s e Posted August 29, 2008 Posted August 29, 2008 My OS is WInXP. I have an application. I want to set its priority to below normal or low after I start this application. I desire to do it through a batch file. How can I do it? Thanx/NSP
Guest Bob I Posted August 29, 2008 Posted August 29, 2008 Re: Need a batch file set priority You would need to do it through scripting. A batch file can't do it after the application has started. n o s p a m p l e a s e wrote: > My OS is WInXP. I have an application. I want to set its priority to > below normal or low after I start this application. > > I desire to do it through a batch file. How can I do it? > > Thanx/NSP
Guest n o s p a m p l e a s e Posted August 29, 2008 Posted August 29, 2008 Re: Need a batch file set priority On Aug 29, 3:01 pm, Bob I <bire...@yahoo.com> wrote: > You would need to do it through scripting. A batch file can't do it > after the application has started. How to do it? Any suggestions! > > n o s p a m p l e a s e wrote: > > > > > My OS is WInXP. I have an application. I want to set its priority to > > below normal or low after I start this application. > > > I desire to do it through a batch file. How can I do it? > > > Thanx/NSP- Hide quoted text - > > - Show quoted text -
Guest Bob I Posted August 29, 2008 Posted August 29, 2008 Re: Need a batch file set priority Try one of the scripting groups, I'd suggest Windows Scripting Host. http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?guid=86d2a4c6-188f-4cda-9c9d-3dc22d5009f5 n o s p a m p l e a s e wrote: > On Aug 29, 3:01 pm, Bob I <bire...@yahoo.com> wrote: > >>You would need to do it through scripting. A batch file can't do it >>after the application has started. > > > How to do it? Any suggestions! > > > >>n o s p a m p l e a s e wrote: >> >> >> >> >>>My OS is WInXP. I have an application. I want to set its priority to >>>below normal or low after I start this application. >> >>>I desire to do it through a batch file. How can I do it? >> >>>Thanx/NSP- Hide quoted text - >> >>- Show quoted text - > >
Guest ju.c Posted August 29, 2008 Posted August 29, 2008 Re: Need a batch file set priority Use START. Open the Run box and enter: cmd In the Command Window type start /? Your shortcut would be like this: START "program.exe" /D"C:\Program Files\Program\" /BELOWNORMAL ------------------------------------------------------------------------------------------------ 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 ------------------------------------------------------------------------------------------------------- ju.c "n o s p a m p l e a s e" <nospam.please@alum.com> wrote in message news:e1d70844-ea80-454a-84c2-a4d27faa25aa@m44g2000hsc.googlegroups.com... > My OS is WInXP. I have an application. I want to set its priority to > below normal or low after I start this application. > > I desire to do it through a batch file. How can I do it? > > Thanx/NSP
Guest Bob I Posted September 2, 2008 Posted September 2, 2008 Re: Need a batch file set priority That won't work AFTER the program is already running, as per the request. ju.c wrote: > Use START. > > Open the Run box and enter: cmd > In the Command Window type start /? > > > Your shortcut would be like this: > START "program.exe" /D"C:\Program Files\Program\" /BELOWNORMAL > > ------------------------------------------------------------------------------------------------ > > 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 > ------------------------------------------------------------------------------------------------------- > > > > ju.c > > > "n o s p a m p l e a s e" <nospam.please@alum.com> wrote in message > news:e1d70844-ea80-454a-84c2-a4d27faa25aa@m44g2000hsc.googlegroups.com... > >> My OS is WInXP. I have an application. I want to set its priority to >> below normal or low after I start this application. >> >> I desire to do it through a batch file. How can I do it? >> >> Thanx/NSP > >
Guest Alec S. Posted September 2, 2008 Posted September 2, 2008 Re: Need a batch file set priority n o s p a m p l e a s e wrote (in news:e1d70844-ea80-454a-84c2-a4d27faa25aa@m44g2000hsc.googlegroups.com): > My OS is WInXP. I have an application. I want to set its priority to > below normal or low after I start this application. > > I desire to do it through a batch file. How can I do it? Windows comes with apps to view and kill processes from the command line, but it does not seem to come with one to change priority so you’ll need a copy of a process manipulation app. The one I use is PV from Igor Nys because it is quite powerful, but there other plenty of others like “Command Line Process Viewer/Killer/Suspender” from BeyondLogic, etc. Just put the app in your path, view the app’s docs to see how it changes priority, and use that command. For example, with PV, I would use: pv -pi calc.exe To set the Calculator to idle priority. HTH -- Alec S. news/alec->synetech/cjb/net
Recommended Posts