DOS /Windows98

When running a DOS session in Windows98 the settings for the port are not saved, i.e. the port is set as....
mode com1: 9600 n 8 1 > nul in the config line but if the session is run and then closed and run again the sys must be restarted, any ideas why or have a more permanent soloution than setting up a batch file
Who is Participating?
m_warConnect With a Mentor Commented:
run MSD, or try to indicate th PORT of the modem, go to dos , write :
echo ATA>com1
then try on the other com's (4 com's).
if you can run MSD, try to see if you have CTS/RTS on NO, if you do, you have
to change the jumpers/slot try to use your modem's manual in order to do so...
Good Luck,
If you put that mode com1: 9600 n 8 1 > nul in your autoexec.bat it should be that way for every DOS session.

You might also look in device manager to see if the port settings have been changed. 9600N81 is the default settings for a serial port.
dikusAuthor Commented:
Sorry Jeff,

Thats the strange thing, its in the Autoexec line already but will make no difference, it doesnt seem to stay resident.
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

It's possible the default settings for the COM port in Windows are overriding the ones you set in your AUTOEXEC.BAT. Try right-clicking My Computer and selecting Properties, then click Device Manager in the dialog box and look for the COM1 device. Right-click this device and modify its properties to what you need, then try your application again.
Have you added this into your msdos.pif file.
It all depends on how you are going into the dos mode.  Look at all your dos reference pif files and you will see where which one it needs to be added to.

Hope it helps.


Wasn't sure so hadda go check to see if Win98 will use the file 'dosstart.bat'.  It does.  That file is automatically run when you exit to msdos and will execute any commands you need or require as long as they can be used in the autoexec.bat file.  The only commands you cannot use are the 'set' commands.  I copied this from the microsoft knowledge base.  Create the file with the commands you want and it should resolve your problem...  Good Luck....
When you restart your computer in MS-DOS mode, any commands in the Dosstart.bat file are carried out. You can place commands you want to be run when you restart your computer in MS-DOS mode in the Dosstart.bat file. To do so, follow these steps:

Start Notepad.

Type the commands you want in the Dosstart.bat file in the empty Notepad file.

On the File menu, click Save As.

Save the file as Dosstart.bat in the Windows folder.

Quit Notepad.

When you restart your computer using the "Restart the computer in MS-DOS mode" or "Restart in MS-DOS mode" option, the "Exit to Dos" file is processed. If you want to use a different Config.sys or Autoexec.bat file for MS-DOS mode, modify the "Exit to Dos" file. To modify the "Exit to Dos" file, follow these steps:

Use the right mouse button to click the "Exit to Dos" file in the Windows folder, and then click Properties on the menu that appears.

NOTE: If the "Exit to Dos" file does not exist in the Windows folder, create it with the following steps, and then try step 1 again:

Click the Start button, and then click Shut Down.

In the Shut Down Windows dialog box, click "Restart the computer in MS-DOS mode", and then click Yes.

At the command prompt, type exit, and then press ENTER.

On the Program tab, click Advanced.

Click the Specify A New MS-DOS Configuration option.

Enter the appropriate lines for the Config.sys file for MS-DOS mode in the Config.sys For MS-DOS Mode box.

Enter the appropriate lines for the Autoexec.bat file for MS-DOS mode in the Autoexec.bat For MS-DOS Mode box.

Click OK.

Click OK.

If you specify a new MS-DOS mode configuration, the specified Config.sys and Autoexec.bat files are processed and the Dosstart.bat file is not processed. If you use the current MS-DOS configuration, the current Config.sys and Autoexec.bat files are processed, and then the commands in the Dosstart.bat file are run.

-create a file called c:\windows\setcom.bat. In the file put mode com1 etc... set the properties to "close on exit".
-Create a shortcut to c:\windows\ In the properties of the shortcut under the Program tab there is a section "Batch File:". enter setcom.bat.
-If you use this new shortcut to dos, it will set the com1 the way you want in the session.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.