VOGONS


First post, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Hi, I am trying to get two old dos programs working on W7 x64 and have got one running correctly without needing to type anything other than double clicking a shortcut but the second needs to be on f: so when I run the below command it mounts the f: drive on c: by default so it tries to run the app from c:\mass89.exe and it needs to be f:\mass89.exe to run.

Any help would be greatly appreciated and also if you know how to run the command with noconsole I would be very grateful indeed as the -noconsole doesnt seem to work in the below?

Thank you

Rick

"C:\Program Files\DOSBox-0.74\DOSBox.exe" -conf "C:\Program Files\DOSBox-0.74\DOSBox.exe" "f:\mass89\mass89.exe"

Reply 1 of 19, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Richard_Tobin wrote:

"C:\Program Files\DOSBox-0.74\DOSBox.exe" -conf "C:\Program Files\DOSBox-0.74\DOSBox.exe" "f:\mass89\mass89.exe"

This doesn't make sense. Did you mean -conf "C:\Program Files\DOSBox-0.74\DOSBox.conf" ?

In this case you will probably have to make a second copy of your DOSBox.conf and specify it using the -conf switch. In the copy, just add these lines to the [autoexec] section:

mount f f:\mass89
f:
mass89.exe

Reply 2 of 19, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

[Thread moved to DOSBox General Section]

Reply 3 of 19, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Thank you for the reply and sorry if this is a bit hazy. Are you able to tell me how I can automate this so that I just need to double click and the program opens without having to type the following each time?

mount f c:\drivef (press enter)
f:\ (press enter)
cd mass89 (press enter)
Mass89 (press enter)

Your help is greatly appreciated as this is a complete nightmare.

Thank you

Rick

Reply 4 of 19, by franpa

User metadata
Rank Oldbie
Rank
Oldbie
Richard_Tobin wrote:

so when I run the below command it mounts the f: drive on c: by default so it tries to run the app from c:\mass89.exe and it needs to be f:\mass89.exe to run.

Oh wait you mean it is mounting the C: as F:? That would explain your situation. The bottom line in your post makes no sense though.

AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.

my website

Reply 5 of 19, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Yep, mounting the c as f and the last line is to run the program so mass89.exe (i just left off the .exe) is this what you mean?

Thanks

Rick

Reply 6 of 19, by franpa

User metadata
Rank Oldbie
Rank
Oldbie

Can I have the path to the other application you are trying to run?

AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.

my website

Reply 7 of 19, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Hi

Certainly, there are 3,

f:\mass89\mass89.exe
f:\mass89CA\mass89.exe
f:\massman\massman.exe

They are all in a folder on c:\drivef but due to their config they will only run from f: as the other people using the program are working over the network, is this what you mean?

Thanks

Rick

Reply 8 of 19, by franpa

User metadata
Rank Oldbie
Rank
Oldbie
Mount F C:\
REM.-- Prepare the Command Processor
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

:menuLOOP
echo.
echo.= Menu =================================================
echo.
for /f "tokens=1,2,* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo. %%B %%C
set choice=
echo.&set /p choice=Make a choice or hit ENTER to quit: ||GOTO:EOF
echo.&call:menu_%choice%
GOTO:menuLOOP

::-----------------------------------------------------------
:: menu functions follow below here
::-----------------------------------------------------------

:menu_1 Run mass89
F:
CD mass89
mass89.exe
GOTO:EOF

:menu_2 Run mass89CA
F:
CD mass89CA
mass89.exe
GOTO:EOF

:menu_3 Run massman
F:
CD massman
massman.exe
GOTO:EOF

copy/paste to the end of dosbox.conf, save&exit then run Dosbox.exe.

Last edited by franpa on 2011-12-19, 15:39. Edited 1 time in total.

AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.

my website

Reply 9 of 19, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Thank you very much for your help here.

I have added it but get a few Illegal Command: GOTO menuLOOP.

so looks like the menu isnt working correctly, I then noticed that we are mounting f as c:\ but the three folders are in c:\drivef so I changed that and now when I run it some of the Illegal Command errors come up but it seems to load the program that is first in the menu list i.e. mass89\mass89.exe

Than you again for your help on this.

Rick

Reply 10 of 19, by franpa

User metadata
Rank Oldbie
Rank
Oldbie

Hmm... I guess DOSBox doesn't support the necessary commands for such a menu then. Menu appears as though it should work when run as a BAT file in Windows (Not DOSBox).

Jorpho appears to be familiar with an alternative approach that should work.

AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.

my website

Reply 11 of 19, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Ok, thank you for your help.

Rick

Reply 12 of 19, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Richard_Tobin wrote:

Thank you for the reply and sorry if this is a bit hazy. Are you able to tell me how I can automate this so that I just need to double click and the program opens without having to type the following each time?

That is precisely what I wrote about in my post.

Is there something in particular you would like me to clarify? If you are not familiar with the [autoexec] section, I believe it is documented in the DOSBox readme.

Franpa's solution is a little more elegant, but I believe he may be mistaken in the formatting of the GOTO command. I think the colons after each GOTO need to be removed. See http://www.computerhope.com/goto.htm .

Reply 13 of 19, by franpa

User metadata
Rank Oldbie
Rank
Oldbie

Like I said, the menu functions correctly when not run via DOSBox as seen here. [img]http://s63.photobucket.com/albums/h133/franpa/?action=view&current=Untitled-101.png][/img]

I also ran it without the @echo off to check it was parsing each menu entry correctly as well and it does.

Edit: I believe it breaks on the For command in DOSBox.

Last edited by franpa on 2011-12-19, 19:48. Edited 1 time in total.

AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.

my website

Reply 14 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well findstr and FOR are not a dos functions and win XP command prompt is NOT DOS!

of course the goto:label thing might be a bug. Would have to try

Water flows down the stream
How to ask questions the smart way!

Reply 15 of 19, by franpa

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:

well findstr and FOR are not a dos functions and win XP command prompt is NOT DOS!

Ah okay. I took the menu code from the first example here http://www.dostips.com/DtTipsMenu.php

AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.

my website

Reply 16 of 19, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Chaps

Wonder if you can help me again, I got the programs to run with different shortcuts with different autoexec items my only question is how can I get the dosbox to close on exit of the program without it goign back to the dos prompt?

"C:\Program Files\DOSBox-0.74\DOSBox.exe" -conf "C:\Program Files\DOSBox-0.74\mass89.conf"

Thank you again for the help on this.

Rick

Reply 17 of 19, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

FOR is a command in real DOS, although I believe more limited than the example posted here. Quite useful for running file utilities on a set of files; but mostly useless for games. 😉

Reply 18 of 19, by VileR

User metadata
Rank l33t
Rank
l33t
Richard_Tobin wrote:

how can I get the dosbox to close on exit of the program without it goign back to the dos prompt?

add the EXIT command at the very end of your autoexec section.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 19 of 19, by Richard_Tobin

User metadata
Rank Newbie
Rank
Newbie

Thank you for your help, should have tried that. Thanks.