# Solved: Need a script to start a program



## tdmasoak (Oct 29, 2010)

ok, here is the situation:

My sister-in-law has Windows 7 Pro 32 bit running on a laptop. She has a 16 bit program that she wants to run full screen. It looks like running this 16 bit program in windows 7 is not going to work. But, I have put dosbox on the laptop and can make the program go into full screen but there are about 4 steps to get it to do it. I want to make something, a script or something that my sister-in-law can double click and all those 4 steps do what they need to do without any other interaction from her. I will put below the steps that have to be done to get the program to show in fullscreen. The program is called MMCIRC, it is a Library file program.

1) open dosbox (double click dosbox icon) (a dosbox window opens similar to a command prompt)

2) mount C C:\MMCIRC (it comes back and tells u that MMCIRC is now mounted)

3) C: (change to C drive in dosbox application)

4) mm (mm is the shortcut to start the MMCIRC program)

once its started , all i have to do is press the Alt key and ENTER and the screen goes to full size.


Can anyone help me with this, i am no good at scripts?


----------



## Techyy (Jul 15, 2010)

-- Open a notepad

Copy & paste the below lines in it and save the file as MMCIRC.bat (Note: this is a batch file, so you need extension <file name>.bat and should not be saved as <file name>.txt file). Save this batch file in an easy access location (EG: Desktop)

ECHO OFF
cd \
mount z c:\MMCIRC
echo ************ MMCIRC is mounted to virtual drive Z: *************
pause
z:
START /MAX mm

-- In above script i have mounted c:\MMCIRC folder to Z drive which will act as an Virtual drive. So your contents in C:\MMCIRC will be accessible in Z: drive which will also be displayed in MY computer. Its not recommendable to use physical hard drive letter C: to mount its own folders.


----------



## tdmasoak (Oct 29, 2010)

First of all, thank you for the help you have given.

I did what you said, but and error popped up, it says mount is not recognized as an internal command, external command, operable program or a batch file.

Now, I used the mount command inside the dosbox application window, maybe that is the difference, because your batch file has nothing to do with dosbox, or am i wrong?


----------



## TheOutcaste (Aug 8, 2007)

Try one of these:
AutoIt
AutoHotKey
You can record a macro that will repeat the steps.

Forgot to add that Mount is a DOSBOX command, not a Windows command.


----------



## tdmasoak (Oct 29, 2010)

thanks for the macros urls, but i have no luck with them, i just dont know how to run them.


----------



## TheOutcaste (Aug 8, 2007)

Install AutoHotKey
Right click on the DOSBOX icon, click Properties.
Copy the contents of the Target box, or note the path and file name displayed. This is where DOSBOX is installed.
Click *Start | All Programs | AutoHotKey | AutoScriptWriter*
Click *Record and Shrink* so it's not depressed.
In the top box next to the *Record* button, paste the line you copied from the Target box, or use the browse button to browse to the DOSBOX program at the location noted above in the Target box.
Click *Record*
Type the following:
*mount C C:\MMCIRC
C:
mm*

when the program starts, press *ALT+Enter*

In the AutoScriptWriter window click *Stop*
Click Save and save the script on the desktop.
Close AutoScriptWriter.

When you double click the script file, it should start DOSBOX and type everything you did.

You may have to tweak it a bit to change the timing, like increasing the time it waits for *mm* to start, but the documentation and tutorials are pretty good.

Example, pressing *ALT+Enter* may hide the AutoScriptWriter window, so you would have to press it again, or minimize the DOSBOX window to get to the stop button. Then you would need to edit out everything after the *Send, {ALTDOWN}{ENTER}{ALTUP}* line


----------



## Squashman (Apr 4, 2003)

Wonder if it would be easier to run it inside XP Mode and create a shortcut that launches it in full screen mode.


----------



## tdmasoak (Oct 29, 2010)

It might be, i will try that


----------



## tdmasoak (Oct 29, 2010)

I installed the XP mode, put the MMCIRC program into the xp mode environment , when I try to set the 16 bit progarm (MMCIRC) into fullscreen, it says the video device failed to initalize for fullscreen mode.


----------



## tdmasoak (Oct 29, 2010)

ok, maybe someone can help me with this: I have expanded CMD to open full screen, now what i need is a way to have the CMD prompt, when it opens, to open at the MMCIRC directory.. Right now, when I open the CMD prompt, it opens at the following: C:\Users\Gloria> what I need is for it to open at C:\Users\Gloria\MMCIRC


----------



## TheOutcaste (Aug 8, 2007)

Edit the *Start in:* Directory for the shortcut you used to open the Command Prompt.
Right click the shortcut, click *Properties*
The *Start In:* box probably has this in it:
*%HOMEDRIVE%%HOMEPATH%*
add the *\MMCIRC* to it so it reads:
*%HOMEDRIVE%%HOMEPATH%\MMCIRC*.
If needed, just create a new shortcut on the desktop. Copy the current one, or right click the Desktop, point to New, click Shortcut, and go through the wizard. For location, type *C:\Windows\System32\cmd.exe*
Then Edit the *Start in:* Folder as above.


----------



## Squashman (Apr 4, 2003)

Did you launch the app as a virtual app or did you open xp mode and then launch it.

On a side note: Dos box can be set to launch in full screen mode by default by making that setting in the config file for dos box


----------



## tdmasoak (Oct 29, 2010)

I open in XP mode,,,,and dosbox needs too much interaction from someone, and my sister in law is 75 years old and I dont want to confuse her that much


----------



## Squashman (Apr 4, 2003)

any app installed inside xp mode can be launched from Windows 7. you don't need to open xp mode first.


----------



## tdmasoak (Oct 29, 2010)

Ok, I used the OUTcaste instructions and I have it working like i need it to work, thank you very much!!!!!!!!


----------

