>>Can the priority of a process or program be controlled in Windows 95 or Windows 98? Or is Windows NT required to do this sort of tricks?
>>
>>Basically, I need to do some background process (maintenance, backup, etc.) regularly, and want it to interfere as little as possible with programs in the foreground. The time taken for the background process is, of course, secondary: if it takes 30 minutes instead of 15, and I use the computer normally (right now, the background process makes the computer terribly slow), that's fine.
>
>Yes, the process priority can be adjusted, either at the time that the process is spawned, or subsequently given a valid Process handle with adequate privileges using SetPriorityClass(), as documented in the Win32 API section here on UT as #12682. Finer control can be achieved given a thread handle using SetThreadPriority(), which allows you to adjust the relative priority of a thread within a process group rather than shifting it to a different process group, as documented in #12689.
First of all, thanks a lot.
Now, the text for the API function mentions only an existing thread, but not spawning a new thread. Basically, I call some external programs, e.g., for data compression. Currently I use RUN, without /N, since I have to do several steps in a certain order - I assume I should use another approach here?
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)