WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DOS

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

RunExit in Windows 95 and Windows NT

Keywords:       RunExit  exit  pif  DOS  MS-DOS  close 

RunExit does not work in Windows 95 or Windows NT because the DOS operating system is not the same as in Windows 3.1. However, you can still exit and run a DOS application by making a change to the properties of the application's PIF file.

How to Exit and Run a DOS application:

Option 1)

  1. Run the application.
  2. Select properties from the drop down list in the Control Menu. This will display the dialog box, "MS DOS Prompt Properties".
  3. On the first tab, push the "Advanced" button.
  4. Under Advanced check the box "MS-DOS MODE". By doing so, this will cause the app to close down windows, run outside of windows and then restart windows when it is closed.
  5. After making these changes. Use WinBatch to Run the program from the PIF file.
                        Run("prog.pif", "")

Option 2)

There seems to be another option, try this and see if it will work:

In the windows directory, there is a 'SHORTCUT TO DOS.PIF' file that, if ShellExecute'd, seems to put the user into a fairly reliable DOS state.

Typing "Exit" reboots the machine, and you're able to rename files like Kernel32.dll.


Article ID:   W12899
Filename:   RunExit in Win95 WinNT.txt
File Created: 1999:04:15:16:50:24
Last Updated: 1999:04:15:16:50:24