Link to home
Start Free TrialLog in
Avatar of ahammar
ahammarFlag for United States of America

asked on

Restart in Dos, Run Dos game...maybe a batch file???

I want to be able to restart my computer in Ms Dos mode and have it automatically start up a game that needs to be run.  Right now I have written a batch file that I can run (bth.bat) after I restart in Ms Dos by typing in bth at the command prompt.  The batch file also loads a dos mouse driver.  Its a very simple batch file...ie

c:\msmouse\mouse.exe
cd c:\bth
bth.exe

I just type in bth (the name of the batch file) at the command prompt and that loads the mouse driver then changes the directory to the bth directory then runs bth (the game)

What I want to do is just be able to click on an icon while windows is running and have it restart in dos and do all that for me without having to manually restart in dos mode then typing in bth at the command prompt.  I have tried running the game from windows but it does not work properly and there is no mouse.

I don't necessarily have to use a batch file, that's just the only way I know to do it at the moment.  
Anyone know how I can do what I want to do.

Thanks and Cheers,
ahammar
Avatar of gonzal13
gonzal13
Flag of United States of America image

I would not default from the dos prompt to the game at all. What happens when you want to be in the dos mode for other reasons?
I seem to remember a command or program to restart in DOS mode. I will see if I can find it again. But in the mean time, you should be able to add the command   bth.bat   to the AUTOEXEC.BAT file in the root dir ( C:\ ) and have it run when you reboot to DOS from the START MENU.
In response to gonzal13, you can modify  bth.bat to give you a choice on whether to run or exit to DOS.
Coral47:
Thanks, I forgot that option. I still have my dos books!

Joe
>> dos books <<  Me too. They still come in handy once in awhile.    : D
SOLUTION
Avatar of paraghs
paraghs
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forgot: you can rename the MSDOS PROMPT icon while in the programs tab.
There is no need for batch file, as you can specify the executable file name, as well as working directory, under Program tab. Mouse support will be there.

Of course, you can rename the link, as well as change the icon under Program tab.
SOLUTION
Avatar of BillDL
BillDL
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BillDL,

You have given a very elaborative response, but missed the point that ahammer wanted "just be able to click on an icon while windows is running and have it restart in dos". The method suggested by me and coral47 is sufficient for this purpose.
Yes, but there is more than one way to skin a cat  ;-)

The rundll command is a simple double-click, the F8 boot menu is an arrow down and <enter> and by sticking a boot floppy in the drive before you double-click the rundll shortcut, you wouldn't see the F8 menu and it would start the game automatically, but only when you choose to insert the floppy.
Avatar of ahammar

ASKER

Wow....
Thanks for all the comments.  I am off to work now, but I will be back tonight to take a closer look at these possibilitites when I have a little more time.  Looks like something here may work.....Thanks again and I'll be back later....

Cheers!
ahammar
Avatar of ahammar

ASKER

Hi everyone,

Well, I've worked on it for awhile and I finally got it to work.  I'm not sure how to give the points now though.  I tried putting the path the the batch file in the autoexec.bat file, but that had no effect at all.  There wasn't a file anywhere named command.pif...I even did a search for it.  I tried copying the msdos prompt shortcut to the desktop but the boxes where I would put a reference to the bth.bat file were greyed out so I couldn't do that.  What I ended up doing was just double-clicking on the bth executable directly from windows explorer and then windows brought up a message asking me if I wanted to change the shortcut properties so that it always started in msdos mode.  I clicked yes and then I was able to add my batch file to that batch file box as coral47 suggested.  I also added the working directory of the game in the working directory box and it works fine.  It restarts in msdos, then runs the game.  I don't know why I wasn't able to do that by just creating a shortcut to the executable, but it wouldn't let me. The shortcut that windows created for me is a PIF file.  I think I actually got the most information that helped me out from coral47 and paraghs.  The information I got from BillDL was very interesting though.  That may be useful to me as I was already familiar with that, but I didn't know about the different options.  I was only aware of shutting down that way.  I was not aware of the other 4 or how to make it work, so that is very useful to me in other ways.  I think what I want to do is increase the points to 200 then split them up...75 for coral47, 75 for paraghs, and 50 for Bill DL.  I guess I didn't really get any info from gonzal13 this time but maybe next time.
Is this ok with everyone??  If not, don't be afraid to speak up....:)

Cheers!
ahammar

ahammar:  Sounds like a winner to me.  Glad it is working.

BillDL: Thanks for the refresh on the rundll command <meow>   : )
I am happy the way you have split the points.

But, I am wondering why you didn't find command.pif. Another way of creating DOS-PROMPT shortcut is to create a shortcut to the COMMAND.COM file (hey, this MUST be there in your Windows directory).

Thanks.
paraghs
That sounds fine to me, ahammer, and thank you for deciding to include me.

The possible reason that you didn't find command.pif is because the .PIF file in Windows is "always hidden" (registry value named "NeverShowExt") and all you would see is a file named "command".  A right-click > "properties" on any file always shows the "MS-DOS Name" in the "general" tab, though.

Right-Click on the DOS Prompt icon on your start menu and you'll see what I mean.  DON'T modify that in any way, or you may get some unwanted behaviour the next time you want a simple little DOS box, eg. starting in full screen, or with massive fonts.

Windows 3.1 came with a utility named PIFEDIT.EXE that allowed you to enter all of the settings manually, so you had to know what you were doing.  The accompanying help file PIFEDIT.HLP is actually quite informative, if you know anyone who still has 3.1 running on a computer.

If you commonly play a few old DOS games on your computer, then I reckon you should brush up on some DOS and create a batch file with a menu that allows you to choose which game you want to play, and then runs it through its own .PIF file with settings tailored for that game.  Old games usually have some sort of readme file that tells you what settings the game likes best, and that way you could get each one to load different settings.  Just a thought.

Ask another question, quote the paths to the games along with the optimal settings, and I'll write you a nice neat menu  ;-)
Avatar of ahammar

ASKER

Ok, I'm glad everyone like that.  I don't know how this is going to work, so I will increase the points with this comment and submit it, then split the points after that...

Thanks and Cheers!
ahammar
Thank you much.    : )
Thank you, ahammer.