HOT high-priority tip

For everything that's not in any way related to PureBasic. General chat etc...
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

HOT high-priority tip

Post by PB »

This is a HOT tip I found out about while surfing!

You know how every app runs at a certain priority (usually "Normal"
unless you change it via the Task Manager), well here's a way you can
launch any app in "High" priority -- meaning that it performs better
and gets things done faster. I tested it with "Virtual PC" and it
makes my virtual NT machine feel almost real-time now, without any
slight delays that it used to have. :)

To use it, create a new batch file in the folder of the desired app.
The batch file consists of this single line:

cmd.exe /c start "xqshp" /high "AppName.exe"

That's it! Just replace AppName.exe with the name of the app in
the folder, and then launch the app with the batch file in future.
You can check the status of the priority with the Task Manager.

This tip ONLY works for NT-based Windows (NT, 2000, XP). Also, you
can actually change /high to /realtime for a faster response, but at
the expense of slowing done system-critical processes on your PC...
Last edited by PB on Mon Nov 03, 2003 2:49 am, edited 1 time in total.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Nice!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
ebs
Enthusiast
Enthusiast
Posts: 561
Joined: Fri Apr 25, 2003 11:08 pm

Post by ebs »

PB,

Thanks - that's really handy!

You don't have to create a batch file (unless you want to). You can just change the Target field in the program's shortcut by adding cmd.exe /c start "xqshp" /high in front of the application name.

Edit: I just checked, and the "xqshp" is just the title of the window that opens and closes quickly before the program runs (you might not even see it on a fast machine). You can just use "" if you want to. The Start command has a number of other parameters - type "Help start" to see them.

One little gotcha: This will change the shortcut icon to the CMD.EXE icon (the "command prompt" icon). You can easily change the icon back to original program icon using the "Change Icon..." button.

Eric
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> You can just use "" (instead of "xqshp") if you want to.

That's what I thought at first (see how my post was edited). But after I
removed "xqshp" it stopped some apps from launching in high priority,
so it definitely seems to be needed (on Win2K Pro SP4 at least).

Update: You're right -- I was totally removing "" which made it fail.
But when I leave double-quotes it works as expected. My bad. :)
Post Reply