We use an old DOS program at work on Win2000 systems. Win 2000 uses ntvdm.exe to run the program. Troube is that ntvdm.exe uses 99% of the processor when it is running.
We didn’t notice it before. Apparently, 1% of the processor is enough to run Outlook, Excel, etc. with little problem.
Web-based applications turn out to be almost totally incompatible with our program taking 99% of the processor. We’ve discovered that downgrading the priority of ntvdm.exe frees up enough of the processor that all programs are happy, including our DOS application.
However, telling some our less computer-savy knuckledraggers how to change the priority everytime they start the program would be an act of futility.
This application is started with a shortcut to a batch file. Is there a way to automatically change the priority in Win 2000, possibly through the batch file?
I’m thinking there might be a way to do this using WSH to start the application… but so far I can’t find anything. I did run across this application that may do the trick, but I haven’t had a chance to try it yet.
You can start the program at a given priority by using the START command from the command prompt or a batch file. For example, to start Notepad at low priority, you would use:
START /LOW notepad.exe
Other priorities you can use are /NORMAL, /HIGH, /REALTIME, /ABOVENORMAL, and /BELOWNORMAL, at least on the WinXP machine I’m writing this from. I believe this is also the case on Win2000.
For more details, go to the command prompt and type HELP START for complete info.
Hmm, getting warmer. On Microsoft’s technet, I found the WMI object that reads the PID and related information, including priority. Maybe after lunch I’ll see if I can figure out a way to change the priority using that interface.
Well, damn. Garnet’s method is even easier. I’ve been googling “2000 XP priority” etc. for a half hour and didn’t come across anything that suggested that. Thanks Garnet!
Hot damn, it works! I always assumed that the /LOW wouldn’t transfer up to ntvdm, and that I’d have to wait until it started, then change the priority.