How to make DOS program suspend in background mode?

D

Dmitry Anikin

Hello!
Now, in '98 the setting of "always suspend" in PIF file worked
(albeit sometimes capriciously), it even had nice toolbar button
to the same effect above DOS box. In XP whether I set it to ON
or to OFF doesn't matter, cpu is 100%. I set it in program's pif,
in _default.pif, whatever... no dice.
So, aren't there some obscure tweaks to make it work?
Please, don't tell me about pause button,
about "Idle Sensitivity" slider (which does work, by the way),
about writing good multitasking-friendly programs...
The programs are written in clipper by the way. Maybe there's
something terribly wrong about clipper that xp can't suspend
them? But '98 could...
 
W

Wesley Vogel

To allocate system resources for an MS-DOS-based program and change its idle
time

Paste into Start | Run...

hh win_dos.chm::/windows_dos_multitask.htm

How to Adjust CPU Time Allotted to an MS-DOS-Based Program
http://support.microsoft.com/kb/142565

Increasing the performance of MS-DOS-based applications
http://support.microsoft.com/kb/102060

Using DOSKBD to Modify MS-DOS Keyboard Polling Detection
http://support.microsoft.com/kb/186560
But '98 could...

Then use 98.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
D

Dmitry Anikin

hh win_dos.chm::/windows_dos_multitask.htm
How to Adjust CPU Time Allotted to an MS-DOS-Based Program
http://support.microsoft.com/kb/142565

Increasing the performance of MS-DOS-based applications
http://support.microsoft.com/kb/102060

Using DOSKBD to Modify MS-DOS Keyboard Polling Detection
http://support.microsoft.com/kb/186560

Well, that's all about idle sensitivity
(and I asked not to tell me about that ;)
It doesn't make a program suspend in background at all,
although solves (many, but not mine) cpu hogging issues.
Strange, the file you mentioned, win_dos.chm doesn't have
any info on "always suspend in background" setting in pif.
But there is such a setting and it doesn't work.
So what's that, a bug? An unsupported feature? Then why
put it there at all? I haven't find info on that in google anywhere,
just someone asking same thing as I on newsgroups
several years ago, and it got no replies at all...
Also, pressing a pause on keyboard does what I want, ie
the program suspends, shouldn't there be a way to do that
programmatically?
 
W

Wesley Vogel

Dmitry,

Getting OLD 16-bit MS_DOS programs to run on NT can be a challenge.
Well, that's all about idle sensitivity
(and I asked not to tell me about that ;)

I know, but if I hadn't, you would have received no replies at all.

I left these out the first time. You can see why.

MS-DOS-Based Program's Always Suspend Check Box Always Selected
http://support.microsoft.com/kb/198140

INFO: The VMD_Set_Mouse_Data() Function
http://support.microsoft.com/kb/244771

If you find that an MS-DOS-based program slows down or stops when it is in
the background:
1. Right-click MS-DOS Prompt on the taskbar, and then click Properties.
2. Click the Misc tab.
3. Drag the Idle sensitivity slider toward Low.
4. Under Background, make sure the Always Suspend check box is cleared.

Microsoft Windows 98 Second Edition Programs.txt File Contents
http://support.microsoft.com/kb/234879

When you run a program in MS-DOS mode, it will force Windows 95 to shut down
and will load the program in an MS-DOS environment. Note that you will not
have access to devices that require protected-mode drivers.
If you find an MS-DOS-based program slowing down or stopping when it is in
the background:
1. Right click the MS-DOS Prompt icon on the taskbar, and then click
Properties.
2. Click the Misc tab.
3. Drag the Idle Sensitivity slider toward Low.
4. In the Background area, make sure that Always Suspend is not checked.
Windows 95 CD-ROM Programs.txt File (1 of 2)
http://support.microsoft.com/kb/135899
Strange, the file you mentioned, win_dos.chm doesn't have
any info on "always suspend in background" setting in pif.
But there is such a setting and it doesn't work.

Because a Search for "always suspend" in Help and Support and in
Command-line reference
c:\Windows\Help\ntcmds.chm::/ntcmds.htm
brought back nothing.

PIF Properties | Misc tab | Background
Always suspend
[[Prevents any system resources from being used by this program when it is
not active.]]

Using PIF files
http://www.microsoft.com/resources/...xp/all/proddocs/en-us/windows_pif_create.mspx
or
hh win_dos.chm::/windows_pif_create.htm

To set up two shortcuts for an MS-DOS program
http://www.microsoft.com/resources/.../all/proddocs/en-us/windows_dos_two_pifs.mspx
or
hh win_dos.chm::/windows_dos_two_pifs.htm

To create or change a program information file (PIF)
http://www.microsoft.com/resources/...all/proddocs/en-us/windows_dos_configure.mspx
or
hh win_dos.chm::/windows_dos_configure.htm

MS-DOS subsystem commands
http://www.microsoft.com/resources/.../xp/all/proddocs/en-us/dos_cmds.mspx?mfr=true
or
hh ntcmds.chm::/dos_cmds.htm

Troubleshooting MS-DOS-based programs in Windows XP
http://support.microsoft.com/kb/314106

How to Troubleshoot 16-Bit Windows Programs in Windows XP
http://support.microsoft.com/kb/314495

Not everything in the following article will apply. The article was written
for Windows 2000. However most of it does.
[[If it was not one of those, you can try the DLLs under the following
registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\W

Value: Known DLLs]]

The above should read...
[[If it was not one of those, you can try the DLLs under the following
registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WOW

Value: Known DLLs]]
Troubleshooting NTVDM and WOW Startup Errors
http://support.microsoft.com/kb/196453

Lots of good 16-bit info here...
Appendix D - Running Nonnative Applications in Windows 2000 Professional
http://www.microsoft.com/technet/prodtechnol/Windows2000Pro/reskit/part8/proch36.mspx

Getting Older Games to Run on Windows XP
http://www.microsoft.com/windowsxp/using/games/expert/durham_og.mspx

Run Older Programs on Windows XP
http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/appcompat.mspx

from Chris Hassler MVP....
Basically, what Compatibility Mode does is allow the older program to
"think" it is being installed on the operating system for which it was
designed.

HOW TO: Use Windows Program Compatibility Mode in Windows XP
http://support.microsoft.com/kb/292533

How to use the Program Compatibility Wizard in Windows XP
http://support.microsoft.com/kb/301911

Getting older programs to run on Windows XP
http://www.microsoft.com/resources/...ddocs/en-us/compatibility_tab_and_wizard.mspx

Make old software work on a new Windows XP machine
By Kim Komando
http://www.microsoft.com/smallbusin...oftware_work_on_a_new_windows_xp_machine.mspx

Using the Compatibility Tab
http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/lgcyapps.mspx#EHAA
from...
How to Run Legacy Applications Using Windows XP
http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/lgcyapps.mspx

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
D

Dmitry Anikin

Wesley Vogel said:
Dmitry,

Getting OLD 16-bit MS_DOS programs to run on NT can be a challenge.

You see, I have no problem with MS DOS program at all. It works just fine.
But I need to suspend it. It's not DOS feature. It was feature of Windows 98,
now it should be a feauture of ntvdm, but ntvdm doesn't acknowledge this setting.
(Though allows you to set it, and pif properties have tooltip saying that this
setting will prevent consuming any resources by program when in background).
Well, I guess I'll consider this a bug and think of some other approach.
Thank you anyway...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top