PDA

View Full Version : Launching Programs in Low Priority from Associated Files?


diggingforgold
03-25-05, 05:28 AM
I would like to run an application in low priority when I click on the file thats associated with it.

Here's an article that touches on starting applications in a specified priority (http://www.tweakxp.com/article139994.aspx), but I don't want to start the application via a shortcut. I want the application to run at a specified priority when I open (any) files that are associated with it.

Simple example: Lets say I want to run MSPAINT.exe in BelowNormal priority whenever I open .BMP files (or any other file associated with mspaint). Is there a tweak to do this?

I'm sick of certain applications locking up windows while they use 100% of my CPU. It would be nice to know how to tweak these apps so they run at a lower priority so I can actually multi-task. This is what I get for not using a dually as my main rig. ;)

I'm running WinXP Pro SP2.

Thanks.

NTX-Zoner
03-25-05, 05:50 AM
I was checking in the registry under hkey_classes_root and that is where all the file associations are made, but I could not see a specific key inside that would set priority, but what I was thinking is if you create a shortcut which sets the apps priority to the level that you want and then associated the shortcut to the file extension, that may do the trick. You also wouldn't have to muck in the registry that way which is always the last reccomended method

Zoned :drool:

redduc900
03-25-05, 06:54 AM
You could create a batch file with the appropriate parameters to start your program and then link this to your icon or menu item for the program in question. You do understand that NT/2000/XP runs the foreground process at 'Above Normal' to begin with and that the OS will dynamically increase the priority based on what's happening with the program at any given time. Manually changing the priority of a process typically won't change it's overall performance unless you're running a lot of processes simultaneously and the CPU load is not near zero at idle.

Here's a link to an article that MS published originally for NT, but they haven't made any drastic changes in how the process priority system works in 2000 or XP...

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q96418

You could also do the same by starting your app from a script (or let the app be an argument/parameter to the script)...

Create Method in Class Win32_Process

http://msdn.microsoft.com/library/en-us/wmisdk/wmi/create_method_in_class_win32_process.asp

Alternatively, you can change the priority on a existing process with Win32_Process.SetPriority...

SetPriority Method in Class Win32_Process

http://msdn.microsoft.com/library/en-us/wmisdk/wmi/setpriority_method_in_class_win32_process.asp