https://www.dosbox.com/wiki/api.php?action=feedcontributions&user=HHaddow990&feedformat=atomDOSBoxWiki - User contributions [en]2024-03-28T19:56:04ZUser contributionsMediaWiki 1.34.1https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4404Shortcuts that You Run in DOSBox2012-02-03T09:54:14Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this version can't be run from dosbox due to the set /P command not being supported by DOS 6 and some other syntax changes if you follow the link at the bottom of the page you can download a dos version that uses Horst's INPUT.COM <br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '': start''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 1 set drive=null''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto again''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': again''<br />
: ''choice /m "do you want to create another shortcut"''<br />
: ''if errorlevel 2 goto end''<br />
: ''goto start''<br />
<br />
: '': end''<br />
: '''''pause'''''<br />
<br />
* This has been tested and run in windows 7 other versions may need some small syntax changes<br />
* I have created two copies of the file one runs in dos and the other is the above code (windows) both of which can be found [http://hhaddow.co.uk/?article=3 here]<br />
* To allow this to run in DOSBox you will need to download INPUT.com from [http://www.horstmuc.de/horst.htm Horstmuc.de] (under Pbats) and place it in the same folder as short.bat</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4403Shortcuts that You Run in DOSBox2012-02-01T14:49:38Z<p>HHaddow990: /* A Small Shortcut Maker */ ammended link now http://hhaddow.co.uk/?article=29.01.12.a rather than http://hhaddow.co.uk/article.php?a=29.01.12a</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this version can't be run from dosbox due to the set /P command not being supported by DOS 6 and some other syntax changes if you follow the link at the bottom of the page you can download a dos version that uses Horst's INPUT.COM <br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '': start''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 1 set drive=null''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto again''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': again''<br />
: ''choice /m "do you want to create another shortcut"''<br />
: ''if errorlevel 2 goto end''<br />
: ''goto start''<br />
<br />
: '': end''<br />
: '''''pause'''''<br />
<br />
* This has been tested and run in windows 7 other versions may need some small syntax changes<br />
* I have created two copies of the file one runs in dos and the other is the above code (windows) both of which can be found [http://hhaddow.co.uk/?article=29.01.12.a here]<br />
* To allow this to run in DOSBox you will need to download INPUT.com from [http://www.horstmuc.de/horst.htm Horstmuc.de] (under Pbats) and place it in the same folder as short.bat</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4402Shortcuts that You Run in DOSBox2012-01-29T20:59:23Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this version can't be run from dosbox due to the set /P command not being supported by DOS 6 and some other syntax changes if you follow the link at the bottom of the page you can download a dos version that uses Horst's INPUT.COM <br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '': start''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 1 set drive=null''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto again''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': again''<br />
: ''choice /m "do you want to create another shortcut"''<br />
: ''if errorlevel 2 goto end''<br />
: ''goto start''<br />
<br />
: '': end''<br />
: '''''pause'''''<br />
<br />
* This has been tested and run in windows 7 other versions may need some small syntax changes<br />
* I have created two copies of the file one runs in dos and the other is the above code (windows) both of which can be found [http://hhaddow.co.uk/article.php?a=29.01.12a here]<br />
* To allow this to run in DOSBox you will need to download INPUT.com from [http://www.horstmuc.de/horst.htm Horstmuc.de] (under Pbats) and place it in the same folder as short.bat</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4401Shortcuts that You Run in DOSBox2012-01-29T13:21:40Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '': start''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 1 set drive=null''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto again''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': again''<br />
: ''choice /m "do you want to create another shortcut"''<br />
: ''if errorlevel 2 goto end''<br />
: ''goto start''<br />
<br />
: '': end''<br />
: '''''pause'''''<br />
<br />
* This has been tested and run in windows 7 other versions may need some small syntax changes<br />
* I have created two copies of the file one runs in dos and the other is the above code (windows) both of which can be found [http://hhaddow.co.uk/article.php?a=29.01.12a here]<br />
* To allow this to run in DOSBox you will need to download INPUT.com from [http://www.horstmuc.de/horst.htm Horstmuc.de] (under Pbats) and place it in the same folder as short.bat</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4400Shortcuts that You Run in DOSBox2012-01-29T12:59:37Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 1 set drive=null''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''<br />
<br />
* This has been tested and run in windows 7 other versions may need some small syntax changes<br />
* I have created two copies of the file one runs in dos and the other is the above code (windows) both of which can be found [http://hhaddow.co.uk/article.php?a=29.01.12a here]<br />
* To allow this to run in DOSBox you will need to download INPUT.com from [http://www.horstmuc.de/horst.htm Horstmuc.de] (under Pbats) and place it in the same folder as short.bat</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4399Shortcuts that You Run in DOSBox2012-01-29T10:25:52Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null''<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''<br />
<br />
* This has been tested and run in windows 7 other versions may need some small syntax changes<br />
* To allow this to run in DOSBox you will need to download INPUT.com from http://www.horstmuc.de/horst.htm (under Pbats) and place it in the same folder as short.bat, then replace all the instances of ''set /P'' with ''input'' and remove the ''/m'' from the ''choice'' commands</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4398Shortcuts that You Run in DOSBox2012-01-29T10:13:59Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null''<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''<br />
<br />
* This has been tested and run in windows 7 other versions may need some small syntax changes</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4397Shortcuts that You Run in DOSBox2012-01-29T10:11:46Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
<br />
You may also want to read [[DOSBoxShortcuts|DOSBox Shortcuts]]<br />
<br />
= Making the Shortcuts =<br />
<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null''<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4396Shortcuts that You Run in DOSBox2012-01-29T10:09:28Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
: ''choice /m "Is the file on the same drive as the shortcut"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null''<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4395Shortcuts that You Run in DOSBox2012-01-29T00:27:16Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and copy this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
: ''choice /m "Is the file on the current drive"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null''<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
<br />
<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4394Shortcuts that You Run in DOSBox2012-01-29T00:26:09Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
: ''choice /m "Is the file on the current drive"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null''<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
<br />
<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4393Shortcuts that You Run in DOSBox2012-01-29T00:25:16Z<p>HHaddow990: /* A Small Shortcut Maker */ highlighted important parts of code</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
* The important parts of the code are in '''bold'''<br />
** ''@echo off''<br />
: '''''set /P file="Enter the name of the program: "'''''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1'' '''''set folder=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%program%'''''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1'' '''''set shortcut=%file%'''''<br />
: ''choice /m "Is the file on the current drive"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null''<br />
: ''write''<br />
<br />
:: ''if exist .\%shortcut%.bat goto error1''<br />
: '': override''<br />
<br />
: '''''echo @echo off >> %shortcut%.bat'''''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: '''''echo cd %folder% >> %shortcut%.bat'''''<br />
: '''''echo %program% >> %shortcut%.bat'''''<br />
: '''''echo cd \ >> %shortcut%.bat'''''<br />
<br />
:: ''if not exist .\%shortcut%.bat goto error2<br />
<br />
<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut% has been created''<br />
:: ''if %drive%==null'' '''''echo A shortcut to the file %file% in the folder %folder% with the name %shortcut% has been created'''''<br />
: '''''echo "To run %file% just type %shortcut%"''''' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
:: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
:: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: '''''pause'''''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4392Shortcuts that You Run in DOSBox2012-01-29T00:14:38Z<p>HHaddow990: added edit checking</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off'' <br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P file="Enter the name of the program: "''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
:: ''if errorlevel 1 set folder=%program%''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
:: ''if errorlevel 1 set shortcut=%program%''<br />
: ''choice /m "Do you want the shortcut to have the same name as the file"''<br />
<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name you want for the shortcut: "''<br />
:: ''if errorlevel 1 set shortcut=%file%''<br />
: ''choice /m "Is the file on the current drive"''<br />
:: ''if errorlevel 2 set /P drive="Enter the correct drive letter: "''<br />
:: ''if errorlevel 1 set drive=null<br />
: ''if exist .\%shortcut%.bat goto error1<br />
<br />
: ''echo @echo off >> %shortcut%.bat''<br />
:: ''if not %drive%==null echo %drive%:\ >> %shortcut%.bat''<br />
: ''echo cd %folder% >> %shortcut%.bat''<br />
: ''echo %program% >> %shortcut%.bat''<br />
: ''echo cd \ >> %shortcut%.bat''<br />
<br />
: ''write''<br />
: ''if not exist .\%shortcut%.bat goto error2<br />
<br />
: '': override<br />
:: ''if not %drive%==null echo A shortcut to the file %file% in the folder %folder% on drive %drive%:\ with the name %shortcut%''<br />
:: ''if %drive%==null echo A shortcut to the file %file% in the folder %folder% with the name %shortcut%''<br />
: ''echo "To run %file% just type %shortcut%"'' <br />
: ''goto end''<br />
<br />
: REM error messages and codes<br />
: '': error1''<br />
: ''echo error (1): there is already a file with the name %shortcut% in this folder''<br />
: ''choice /m "overwrite file"''<br />
: ''if not errorlevel 2 goto override''<br />
: ''choice /m "chose another name for your shortcut"''<br />
: ''if errorlevel 1 set /P shortcut="Enter the name you want for the shortcut: "''<br />
: ''if errorlevel 1 goto : ''write''<br />
: ''goto end''<br />
<br />
: '': error2''<br />
: ''echo error (2): file creation failed''<br />
: ''goto end''<br />
<br />
: '': end''<br />
: ''pause''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4391Shortcuts that You Run in DOSBox2012-01-28T22:25:10Z<p>HHaddow990: /* A Small Shortcut Maker */ added code to name the shortcut differently from the file, introduced output text and added information in the folder part of the code</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''choice /m "Does the program folder have the same name as the program file (only if folder is in shortcut directory): "<br />
: REM i.e. shortcut is C:short (in DOSBox) and file is C:\folder\file<br />
: REM say no if folder is C:\prog\folder\file and if shortcut is in C:\shortf\short use the full path<br />
:: ''if errorlevel 1 set folder=%program%''<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
:: ''if errorlevel 1 set shortcut=%program%''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
: ''echo @echo off > %shortcut%.bat''<br />
: ''echo cd %folder% >> %shortcut%.bat''<br />
: ''echo %program% >> %shortcut%.bat''<br />
: ''echo cd \ >> %shortcut%.bat''<br />
: ''echo "A shortcut to the file %file% in the folder %folder% wwith the name %shortcut%"''<br />
: ''echo "To run %file% just type %shortcut%"''<br />
: ''pause''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4390Shortcuts that You Run in DOSBox2012-01-28T22:01:08Z<p>HHaddow990: /* A Small Shortcut Maker */</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''choice /m "Does the program folder have the same name as the program file"''<br />
:: ''if errorlevel 1 set folder=%program%''<br />
:: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
:: ''if errorlevel 1 set shortcut=%program%''<br />
:: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
: ''echo @echo off > %shortcut%.bat''<br />
: ''echo cd %folder% >> %shortcut%.bat''<br />
: ''echo %program% >> %shortcut%.bat''<br />
: ''echo cd \ >> %shortcut%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4389Shortcuts that You Run in DOSBox2012-01-28T22:00:19Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''choice /m "Does the program folder have the same name as the program file"''<br />
: ''if errorlevel 1 set folder=%program%''<br />
: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
: ''choice /m "Do you want the shortcut to have the same name as the program file"''<br />
: ''if errorlevel 1 set shortcut=%program%''<br />
: ''if errorlevel 2 set /P shortcut="Enter the name of the shortcut: "''<br />
: ''echo @echo off > %shortcut%.bat''<br />
: ''echo cd %folder% >> %shortcut%.bat''<br />
: ''echo %program% >> %shortcut%.bat''<br />
: ''echo cd \ >> %shortcut%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4388Shortcuts that You Run in DOSBox2012-01-28T18:50:58Z<p>HHaddow990: /* A Small Shortcut Maker */ debugged code works on windows 7 but still not in dos, moved the file writing code to the end of the file</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''choice /m "Does the program folder have the same name as the program file"''<br />
: ''if errorlevel 1 set folder=%program%''<br />
: ''if errorlevel 2 set /P folder="Enter the name of the program folder: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %folder% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4387Shortcuts that You Run in DOSBox2012-01-28T18:13:32Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''<br />
<br />
= A Small Shortcut Maker =<br />
<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code you will also have to change the choice syntax from choice [/m "text"] to choice [text])<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''choice /m "Does the program folder have the same name as the program file"''<br />
: ''if errorlevel 1 set /P programf="Enter the name of the program folder: "''<br />
: ''if errorlevel 2 programf=program''<br />
: ''echo cd %programf% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4386Shortcuts that You Run in DOSBox2012-01-28T17:37:22Z<p>HHaddow990: made the code more dynamic, allowing for programs that have a different name for the program and program file (i.e. cd "program file"; and pf.exe)</p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly<br />
* Unfortunately this can't be run from dosbox due to the set /P command not being supported by DOS 6.22 (if there is a native command that will allow for the input of a string then feel free to modify the code)<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''choice does the program folder have the same name as the program file''<br />
: ''if errorlevel 1 set /P programf="Enter the name of the program Folder: "''<br />
: ''if errorlevel 2 echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''<br />
<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4385Shortcuts that You Run in DOSBox2012-01-28T17:20:34Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly but this will assume that the program name and folder are the same<br />
* Unfortunately this can't be run from dosbox<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''<br />
<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''C:\''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4384Shortcuts that You Run in DOSBox2012-01-28T17:20:01Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly but this will assume that the program name and folder are the same<br />
* Unfortunately this can't be run from dosbox<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''<br />
<br />
* If autoexec is empty then you will need to add the lines<br />
** ''mount C C:\folder''<br />
: and<br />
: ''c:\''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4383Shortcuts that You Run in DOSBox2012-01-28T16:55:46Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \<br />
: REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly but this will assume that the program name and folder are the same<br />
* Unfortunately this can't be run from dosbox<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=DOSBoxShortcuts&diff=4382DOSBoxShortcuts2012-01-28T16:54:28Z<p>HHaddow990: inserted link to Shortcuts that You Run in DOSBox</p>
<hr />
<div>This page explains how to create shortcuts to DOS games or programs so that they can be run with a double click, as any other program, while still using DosBox to emulate the DOS environment.<br />
<br />
You may also be interested in [[Shortcuts that You Run in DOSBox]]<br />
<br />
= Windows =<br />
* This explains how to setup DosBox game or application shortcuts for Windows.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you haven't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
<br />
== Short Version ==<br />
''This is the quick version for people familiar with Windows, giving the basic information.''<br />
* Create a new shortcut to the DOSBox .exe file, or copy the one created when you installed DOSBox.<br />
* Edit the properties of the shortcut.<br />
* At the end of the "Target" line, add, in quotes, the full path of the main game executable that you wish to launch.<br />
** For example, if "The Settlers 2" was installed into the folder <nowiki>C:\Games\Settlers 2\</nowiki>, and DosBox is installed at it's default location, the target box would contain:<br />
**''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" -conf "C:\Program Files\DOSBox-0.72\dosbox.conf" "C:\Games\Settlers 2\S2.exe"</nowiki>''<br />
* NB: the -conf command line option, which is specified in the line above, is optional, since it refers to the default config file. However, if you use a custom config file, then you will need to retain this line, suitably amended to refer to your custom .conf file.<br />
<br />
== Long Version ==<br />
''This is a more detailed explanation for people who are less familiar with windows. It follows the same procedure, but explains how to carry out each step in much more detail. If you can't follow the short version, read on!''<br />
* Go to the folder where you want the shortcut to be placed, this can be any folder, or the desktop.<br />
* '''Right click''' in empty space in the folder. Highlight "New" and '''click''' "Shortcut".<br />
[[Image:newshortcut.png]]<br />
* The following window will appear.<br />
[[Image:newshortcuthighlight.png]]<br />
* In the highlighted box, type in the '''full path of the DosBox .exe file, in quotes'''. For example, if you didn't change the defaults when installing DosBox, you will need to type ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe"</nowiki>'', assuming you are using version 0.72.<br />
[[Image:shortcutpart1.png]]<br />
* Next, type a space. Then, '''again in quotes, type the full path of the main game executable''', either .exe or .bat, which you want to run. For example, if you wanted to run The Settlers 2, which was installed in C:\Games\The Settlers 2\ (the .exe for which is called S2.exe) you would type ''<nowiki>"C:\Games\The Settlers 2\S2.exe"</nowiki>''.<br />
* Thus, the whole line would now read:<br />
** ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" "C:\Games\The Settlers 2\S2.exe"</nowiki>''<br />
[[Image:shortcutpart2.png]]<br />
* '''Click''' the highlighted "Next" button.<br />
* In the highlighted box on the next window, you can '''enter a name for the shortcut'''. Then, '''click''' the "Finish" button.<br />
[[Image:shortcutpart3.png]]<br />
* A shortcut should now be present in the folder where you originally right-clicked. To run your game or application, '''double click this shortcut''' as if it were a normal shortcut to a windows program.<br />
[[Image:shortcut.png]]<br />
* When you double click this shortcut, DosBox should launch and the game should be run automatically. If it does not, then you should double check that the paths which you entered when creating the shortcut are correct.<br />
* To view or change the properties of the shortcut, '''right click''' on the shortcut and '''click''' on "Properties".<br />
[[Image:properties1.png]]<br />
* The following window will appear. The "Target" box contains the command which you entered when creating the shortcut. '''Check that the paths are correct''' and that each part of the command has enclosing double-quotes.<br />
* '''Click''' OK to save any changes you make, or Cancel to discard any changes.<br />
[[Image:properties2.png]]<br />
* NB: If you use a custom configuration file (.conf file) for dosbox, then you will need to add the -conf command line argument between the path of the DosBox .exe and the path of the game .exe. See the last step of the short explanation to see what this should look like.<br />
<br />
= Other Operating Systems =<br />
* Similar operations should be possible on other operating systems, although this has not been tested directly.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you havn't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
* See the "short" tutorial in the windows section for an overview of the general concept.<br />
* Create a shortcut to the dosbox executable. Make the last argument the path to the game executable which you wish to run. Executing this shortcut should then launch the game automatically.<br />
* Under a linux / unix type system, the command would probably look similar to the following:<br />
** ''<nowiki>./usr/bin/dosbox ~/games/settlers2/s2.exe</nowiki>''<br />
* On OSX, use a command like this<br />
** ''<nowiki>/Applications/DOSBox.app/Contents/MacOS/DOSBox /Applications/DOS/tubworld.bat</nowiki>''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4381Shortcuts that You Run in DOSBox2012-01-28T16:51:40Z<p>HHaddow990: </p>
<hr />
<div>* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \ REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly but this will assume that the program name and folder are the same<br />
* Unfortunately this can't be run from dosbox<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=DOSBoxShortcuts&diff=4380DOSBoxShortcuts2012-01-28T16:51:06Z<p>HHaddow990: Moved = Within DOSBox it's self = to Shortcuts that You Run in DOSBox </p>
<hr />
<div>This page explains how to create shortcuts to DOS games or programs so that they can be run with a double click, as any other program, while still using DosBox to emulate the DOS environment.<br />
<br />
= Windows =<br />
* This explains how to setup DosBox game or application shortcuts for Windows.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you haven't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
<br />
== Short Version ==<br />
''This is the quick version for people familiar with Windows, giving the basic information.''<br />
* Create a new shortcut to the DOSBox .exe file, or copy the one created when you installed DOSBox.<br />
* Edit the properties of the shortcut.<br />
* At the end of the "Target" line, add, in quotes, the full path of the main game executable that you wish to launch.<br />
** For example, if "The Settlers 2" was installed into the folder <nowiki>C:\Games\Settlers 2\</nowiki>, and DosBox is installed at it's default location, the target box would contain:<br />
**''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" -conf "C:\Program Files\DOSBox-0.72\dosbox.conf" "C:\Games\Settlers 2\S2.exe"</nowiki>''<br />
* NB: the -conf command line option, which is specified in the line above, is optional, since it refers to the default config file. However, if you use a custom config file, then you will need to retain this line, suitably amended to refer to your custom .conf file.<br />
<br />
== Long Version ==<br />
''This is a more detailed explanation for people who are less familiar with windows. It follows the same procedure, but explains how to carry out each step in much more detail. If you can't follow the short version, read on!''<br />
* Go to the folder where you want the shortcut to be placed, this can be any folder, or the desktop.<br />
* '''Right click''' in empty space in the folder. Highlight "New" and '''click''' "Shortcut".<br />
[[Image:newshortcut.png]]<br />
* The following window will appear.<br />
[[Image:newshortcuthighlight.png]]<br />
* In the highlighted box, type in the '''full path of the DosBox .exe file, in quotes'''. For example, if you didn't change the defaults when installing DosBox, you will need to type ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe"</nowiki>'', assuming you are using version 0.72.<br />
[[Image:shortcutpart1.png]]<br />
* Next, type a space. Then, '''again in quotes, type the full path of the main game executable''', either .exe or .bat, which you want to run. For example, if you wanted to run The Settlers 2, which was installed in C:\Games\The Settlers 2\ (the .exe for which is called S2.exe) you would type ''<nowiki>"C:\Games\The Settlers 2\S2.exe"</nowiki>''.<br />
* Thus, the whole line would now read:<br />
** ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" "C:\Games\The Settlers 2\S2.exe"</nowiki>''<br />
[[Image:shortcutpart2.png]]<br />
* '''Click''' the highlighted "Next" button.<br />
* In the highlighted box on the next window, you can '''enter a name for the shortcut'''. Then, '''click''' the "Finish" button.<br />
[[Image:shortcutpart3.png]]<br />
* A shortcut should now be present in the folder where you originally right-clicked. To run your game or application, '''double click this shortcut''' as if it were a normal shortcut to a windows program.<br />
[[Image:shortcut.png]]<br />
* When you double click this shortcut, DosBox should launch and the game should be run automatically. If it does not, then you should double check that the paths which you entered when creating the shortcut are correct.<br />
* To view or change the properties of the shortcut, '''right click''' on the shortcut and '''click''' on "Properties".<br />
[[Image:properties1.png]]<br />
* The following window will appear. The "Target" box contains the command which you entered when creating the shortcut. '''Check that the paths are correct''' and that each part of the command has enclosing double-quotes.<br />
* '''Click''' OK to save any changes you make, or Cancel to discard any changes.<br />
[[Image:properties2.png]]<br />
* NB: If you use a custom configuration file (.conf file) for dosbox, then you will need to add the -conf command line argument between the path of the DosBox .exe and the path of the game .exe. See the last step of the short explanation to see what this should look like.<br />
<br />
= Other Operating Systems =<br />
* Similar operations should be possible on other operating systems, although this has not been tested directly.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you havn't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
* See the "short" tutorial in the windows section for an overview of the general concept.<br />
* Create a shortcut to the dosbox executable. Make the last argument the path to the game executable which you wish to run. Executing this shortcut should then launch the game automatically.<br />
* Under a linux / unix type system, the command would probably look similar to the following:<br />
** ''<nowiki>./usr/bin/dosbox ~/games/settlers2/s2.exe</nowiki>''<br />
* On OSX, use a command like this<br />
** ''<nowiki>/Applications/DOSBox.app/Contents/MacOS/DOSBox /Applications/DOS/tubworld.bat</nowiki>''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=Shortcuts_that_You_Run_in_DOSBox&diff=4379Shortcuts that You Run in DOSBox2012-01-28T16:50:02Z<p>HHaddow990: Moved from DOSBoxShortcuts</p>
<hr />
<div>= Shortcuts that You Run in DOSBox =<br />
<br />
* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \ REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly but this will assume that the program name and folder are the same<br />
* Unfortunately this can't be run from dosbox<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=DOSBoxShortcuts&diff=4378DOSBoxShortcuts2012-01-28T16:45:12Z<p>HHaddow990: /* Within DOSBox it's self */</p>
<hr />
<div>This page explains how to create shortcuts to DOS games or programs so that they can be run with a double click, as any other program, while still using DosBox to emulate the DOS environment.<br />
<br />
= Windows =<br />
* This explains how to setup DosBox game or application shortcuts for Windows.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you haven't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
<br />
== Short Version ==<br />
''This is the quick version for people familiar with Windows, giving the basic information.''<br />
* Create a new shortcut to the DOSBox .exe file, or copy the one created when you installed DOSBox.<br />
* Edit the properties of the shortcut.<br />
* At the end of the "Target" line, add, in quotes, the full path of the main game executable that you wish to launch.<br />
** For example, if "The Settlers 2" was installed into the folder <nowiki>C:\Games\Settlers 2\</nowiki>, and DosBox is installed at it's default location, the target box would contain:<br />
**''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" -conf "C:\Program Files\DOSBox-0.72\dosbox.conf" "C:\Games\Settlers 2\S2.exe"</nowiki>''<br />
* NB: the -conf command line option, which is specified in the line above, is optional, since it refers to the default config file. However, if you use a custom config file, then you will need to retain this line, suitably amended to refer to your custom .conf file.<br />
<br />
== Long Version ==<br />
''This is a more detailed explanation for people who are less familiar with windows. It follows the same procedure, but explains how to carry out each step in much more detail. If you can't follow the short version, read on!''<br />
* Go to the folder where you want the shortcut to be placed, this can be any folder, or the desktop.<br />
* '''Right click''' in empty space in the folder. Highlight "New" and '''click''' "Shortcut".<br />
[[Image:newshortcut.png]]<br />
* The following window will appear.<br />
[[Image:newshortcuthighlight.png]]<br />
* In the highlighted box, type in the '''full path of the DosBox .exe file, in quotes'''. For example, if you didn't change the defaults when installing DosBox, you will need to type ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe"</nowiki>'', assuming you are using version 0.72.<br />
[[Image:shortcutpart1.png]]<br />
* Next, type a space. Then, '''again in quotes, type the full path of the main game executable''', either .exe or .bat, which you want to run. For example, if you wanted to run The Settlers 2, which was installed in C:\Games\The Settlers 2\ (the .exe for which is called S2.exe) you would type ''<nowiki>"C:\Games\The Settlers 2\S2.exe"</nowiki>''.<br />
* Thus, the whole line would now read:<br />
** ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" "C:\Games\The Settlers 2\S2.exe"</nowiki>''<br />
[[Image:shortcutpart2.png]]<br />
* '''Click''' the highlighted "Next" button.<br />
* In the highlighted box on the next window, you can '''enter a name for the shortcut'''. Then, '''click''' the "Finish" button.<br />
[[Image:shortcutpart3.png]]<br />
* A shortcut should now be present in the folder where you originally right-clicked. To run your game or application, '''double click this shortcut''' as if it were a normal shortcut to a windows program.<br />
[[Image:shortcut.png]]<br />
* When you double click this shortcut, DosBox should launch and the game should be run automatically. If it does not, then you should double check that the paths which you entered when creating the shortcut are correct.<br />
* To view or change the properties of the shortcut, '''right click''' on the shortcut and '''click''' on "Properties".<br />
[[Image:properties1.png]]<br />
* The following window will appear. The "Target" box contains the command which you entered when creating the shortcut. '''Check that the paths are correct''' and that each part of the command has enclosing double-quotes.<br />
* '''Click''' OK to save any changes you make, or Cancel to discard any changes.<br />
[[Image:properties2.png]]<br />
* NB: If you use a custom configuration file (.conf file) for dosbox, then you will need to add the -conf command line argument between the path of the DosBox .exe and the path of the game .exe. See the last step of the short explanation to see what this should look like.<br />
<br />
= Other Operating Systems =<br />
* Similar operations should be possible on other operating systems, although this has not been tested directly.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you havn't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
* See the "short" tutorial in the windows section for an overview of the general concept.<br />
* Create a shortcut to the dosbox executable. Make the last argument the path to the game executable which you wish to run. Executing this shortcut should then launch the game automatically.<br />
* Under a linux / unix type system, the command would probably look similar to the following:<br />
** ''<nowiki>./usr/bin/dosbox ~/games/settlers2/s2.exe</nowiki>''<br />
* On OSX, use a command like this<br />
** ''<nowiki>/Applications/DOSBox.app/Contents/MacOS/DOSBox /Applications/DOS/tubworld.bat</nowiki>''<br />
<br />
<br />
= Within DOSBox it's self =<br />
<br />
* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \ REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly but this will assume that the program name and folder are the same<br />
* Unfortunately this can't be run from dosbox<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=DOSBoxShortcuts&diff=4377DOSBoxShortcuts2012-01-28T16:40:30Z<p>HHaddow990: added code for a shortcut creator for the in DOSBox shortcuts i added earlier please feel free to move my section to a more appropriate place if necessary</p>
<hr />
<div>This page explains how to create shortcuts to DOS games or programs so that they can be run with a double click, as any other program, while still using DosBox to emulate the DOS environment.<br />
<br />
= Windows =<br />
* This explains how to setup DosBox game or application shortcuts for Windows.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you haven't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
<br />
== Short Version ==<br />
''This is the quick version for people familiar with Windows, giving the basic information.''<br />
* Create a new shortcut to the DOSBox .exe file, or copy the one created when you installed DOSBox.<br />
* Edit the properties of the shortcut.<br />
* At the end of the "Target" line, add, in quotes, the full path of the main game executable that you wish to launch.<br />
** For example, if "The Settlers 2" was installed into the folder <nowiki>C:\Games\Settlers 2\</nowiki>, and DosBox is installed at it's default location, the target box would contain:<br />
**''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" -conf "C:\Program Files\DOSBox-0.72\dosbox.conf" "C:\Games\Settlers 2\S2.exe"</nowiki>''<br />
* NB: the -conf command line option, which is specified in the line above, is optional, since it refers to the default config file. However, if you use a custom config file, then you will need to retain this line, suitably amended to refer to your custom .conf file.<br />
<br />
== Long Version ==<br />
''This is a more detailed explanation for people who are less familiar with windows. It follows the same procedure, but explains how to carry out each step in much more detail. If you can't follow the short version, read on!''<br />
* Go to the folder where you want the shortcut to be placed, this can be any folder, or the desktop.<br />
* '''Right click''' in empty space in the folder. Highlight "New" and '''click''' "Shortcut".<br />
[[Image:newshortcut.png]]<br />
* The following window will appear.<br />
[[Image:newshortcuthighlight.png]]<br />
* In the highlighted box, type in the '''full path of the DosBox .exe file, in quotes'''. For example, if you didn't change the defaults when installing DosBox, you will need to type ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe"</nowiki>'', assuming you are using version 0.72.<br />
[[Image:shortcutpart1.png]]<br />
* Next, type a space. Then, '''again in quotes, type the full path of the main game executable''', either .exe or .bat, which you want to run. For example, if you wanted to run The Settlers 2, which was installed in C:\Games\The Settlers 2\ (the .exe for which is called S2.exe) you would type ''<nowiki>"C:\Games\The Settlers 2\S2.exe"</nowiki>''.<br />
* Thus, the whole line would now read:<br />
** ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" "C:\Games\The Settlers 2\S2.exe"</nowiki>''<br />
[[Image:shortcutpart2.png]]<br />
* '''Click''' the highlighted "Next" button.<br />
* In the highlighted box on the next window, you can '''enter a name for the shortcut'''. Then, '''click''' the "Finish" button.<br />
[[Image:shortcutpart3.png]]<br />
* A shortcut should now be present in the folder where you originally right-clicked. To run your game or application, '''double click this shortcut''' as if it were a normal shortcut to a windows program.<br />
[[Image:shortcut.png]]<br />
* When you double click this shortcut, DosBox should launch and the game should be run automatically. If it does not, then you should double check that the paths which you entered when creating the shortcut are correct.<br />
* To view or change the properties of the shortcut, '''right click''' on the shortcut and '''click''' on "Properties".<br />
[[Image:properties1.png]]<br />
* The following window will appear. The "Target" box contains the command which you entered when creating the shortcut. '''Check that the paths are correct''' and that each part of the command has enclosing double-quotes.<br />
* '''Click''' OK to save any changes you make, or Cancel to discard any changes.<br />
[[Image:properties2.png]]<br />
* NB: If you use a custom configuration file (.conf file) for dosbox, then you will need to add the -conf command line argument between the path of the DosBox .exe and the path of the game .exe. See the last step of the short explanation to see what this should look like.<br />
<br />
= Other Operating Systems =<br />
* Similar operations should be possible on other operating systems, although this has not been tested directly.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you havn't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
* See the "short" tutorial in the windows section for an overview of the general concept.<br />
* Create a shortcut to the dosbox executable. Make the last argument the path to the game executable which you wish to run. Executing this shortcut should then launch the game automatically.<br />
* Under a linux / unix type system, the command would probably look similar to the following:<br />
** ''<nowiki>./usr/bin/dosbox ~/games/settlers2/s2.exe</nowiki>''<br />
* On OSX, use a command like this<br />
** ''<nowiki>/Applications/DOSBox.app/Contents/MacOS/DOSBox /Applications/DOS/tubworld.bat</nowiki>''<br />
<br />
<br />
= Within DOSBox it's self =<br />
<br />
* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* The shortcuts will need to be in the same (mounted) drive as the program(s) you want to run<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \ REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.<br />
* You can write a program to do this quickly but this will assume that the program name and folder are the same<br />
* This also can be run from dosbox<br />
* Create a batch file in the directory you want the shortcuts to be in lets call it short.bat and write this to it<br />
** ''@echo off''<br />
: ''set /P program="Enter the name of the program: "''<br />
: ''echo @echo off > %program%.bat''<br />
: ''echo cd %program% >> %program%.bat''<br />
: ''echo %program% >> %program%.bat''<br />
: ''echo cd \ >> %program%.bat''</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=DOSBoxShortcuts&diff=4376DOSBoxShortcuts2012-01-28T16:10:33Z<p>HHaddow990: </p>
<hr />
<div>This page explains how to create shortcuts to DOS games or programs so that they can be run with a double click, as any other program, while still using DosBox to emulate the DOS environment.<br />
<br />
= Windows =<br />
* This explains how to setup DosBox game or application shortcuts for Windows.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you haven't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
<br />
== Short Version ==<br />
''This is the quick version for people familiar with Windows, giving the basic information.''<br />
* Create a new shortcut to the DOSBox .exe file, or copy the one created when you installed DOSBox.<br />
* Edit the properties of the shortcut.<br />
* At the end of the "Target" line, add, in quotes, the full path of the main game executable that you wish to launch.<br />
** For example, if "The Settlers 2" was installed into the folder <nowiki>C:\Games\Settlers 2\</nowiki>, and DosBox is installed at it's default location, the target box would contain:<br />
**''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" -conf "C:\Program Files\DOSBox-0.72\dosbox.conf" "C:\Games\Settlers 2\S2.exe"</nowiki>''<br />
* NB: the -conf command line option, which is specified in the line above, is optional, since it refers to the default config file. However, if you use a custom config file, then you will need to retain this line, suitably amended to refer to your custom .conf file.<br />
<br />
== Long Version ==<br />
''This is a more detailed explanation for people who are less familiar with windows. It follows the same procedure, but explains how to carry out each step in much more detail. If you can't follow the short version, read on!''<br />
* Go to the folder where you want the shortcut to be placed, this can be any folder, or the desktop.<br />
* '''Right click''' in empty space in the folder. Highlight "New" and '''click''' "Shortcut".<br />
[[Image:newshortcut.png]]<br />
* The following window will appear.<br />
[[Image:newshortcuthighlight.png]]<br />
* In the highlighted box, type in the '''full path of the DosBox .exe file, in quotes'''. For example, if you didn't change the defaults when installing DosBox, you will need to type ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe"</nowiki>'', assuming you are using version 0.72.<br />
[[Image:shortcutpart1.png]]<br />
* Next, type a space. Then, '''again in quotes, type the full path of the main game executable''', either .exe or .bat, which you want to run. For example, if you wanted to run The Settlers 2, which was installed in C:\Games\The Settlers 2\ (the .exe for which is called S2.exe) you would type ''<nowiki>"C:\Games\The Settlers 2\S2.exe"</nowiki>''.<br />
* Thus, the whole line would now read:<br />
** ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" "C:\Games\The Settlers 2\S2.exe"</nowiki>''<br />
[[Image:shortcutpart2.png]]<br />
* '''Click''' the highlighted "Next" button.<br />
* In the highlighted box on the next window, you can '''enter a name for the shortcut'''. Then, '''click''' the "Finish" button.<br />
[[Image:shortcutpart3.png]]<br />
* A shortcut should now be present in the folder where you originally right-clicked. To run your game or application, '''double click this shortcut''' as if it were a normal shortcut to a windows program.<br />
[[Image:shortcut.png]]<br />
* When you double click this shortcut, DosBox should launch and the game should be run automatically. If it does not, then you should double check that the paths which you entered when creating the shortcut are correct.<br />
* To view or change the properties of the shortcut, '''right click''' on the shortcut and '''click''' on "Properties".<br />
[[Image:properties1.png]]<br />
* The following window will appear. The "Target" box contains the command which you entered when creating the shortcut. '''Check that the paths are correct''' and that each part of the command has enclosing double-quotes.<br />
* '''Click''' OK to save any changes you make, or Cancel to discard any changes.<br />
[[Image:properties2.png]]<br />
* NB: If you use a custom configuration file (.conf file) for dosbox, then you will need to add the -conf command line argument between the path of the DosBox .exe and the path of the game .exe. See the last step of the short explanation to see what this should look like.<br />
<br />
= Other Operating Systems =<br />
* Similar operations should be possible on other operating systems, although this has not been tested directly.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you havn't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
* See the "short" tutorial in the windows section for an overview of the general concept.<br />
* Create a shortcut to the dosbox executable. Make the last argument the path to the game executable which you wish to run. Executing this shortcut should then launch the game automatically.<br />
* Under a linux / unix type system, the command would probably look similar to the following:<br />
** ''<nowiki>./usr/bin/dosbox ~/games/settlers2/s2.exe</nowiki>''<br />
* On OSX, use a command like this<br />
** ''<nowiki>/Applications/DOSBox.app/Contents/MacOS/DOSBox /Applications/DOS/tubworld.bat</nowiki>''<br />
<br />
<br />
= Within DOSBox it's self =<br />
<br />
* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount settings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off REM you can remove this for trouble shooting''<br />
: ''cd [program dir]''<br />
: ''[program]''<br />
: ''cd \ REM once the program is closed this will take you back to the root directory''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
: ''cd \''<br />
* and to run it all you need to do is type 'hospital'.</div>HHaddow990https://www.dosbox.com/wiki/index.php?title=DOSBoxShortcuts&diff=4375DOSBoxShortcuts2012-01-28T15:56:03Z<p>HHaddow990: added instructions on how to create a shortcut that you can run in dosbox</p>
<hr />
<div>This page explains how to create shortcuts to DOS games or programs so that they can be run with a double click, as any other program, while still using DosBox to emulate the DOS environment.<br />
<br />
= Windows =<br />
* This explains how to setup DosBox game or application shortcuts for Windows.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you haven't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
<br />
== Short Version ==<br />
''This is the quick version for people familiar with Windows, giving the basic information.''<br />
* Create a new shortcut to the DOSBox .exe file, or copy the one created when you installed DOSBox.<br />
* Edit the properties of the shortcut.<br />
* At the end of the "Target" line, add, in quotes, the full path of the main game executable that you wish to launch.<br />
** For example, if "The Settlers 2" was installed into the folder <nowiki>C:\Games\Settlers 2\</nowiki>, and DosBox is installed at it's default location, the target box would contain:<br />
**''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" -conf "C:\Program Files\DOSBox-0.72\dosbox.conf" "C:\Games\Settlers 2\S2.exe"</nowiki>''<br />
* NB: the -conf command line option, which is specified in the line above, is optional, since it refers to the default config file. However, if you use a custom config file, then you will need to retain this line, suitably amended to refer to your custom .conf file.<br />
<br />
== Long Version ==<br />
''This is a more detailed explanation for people who are less familiar with windows. It follows the same procedure, but explains how to carry out each step in much more detail. If you can't follow the short version, read on!''<br />
* Go to the folder where you want the shortcut to be placed, this can be any folder, or the desktop.<br />
* '''Right click''' in empty space in the folder. Highlight "New" and '''click''' "Shortcut".<br />
[[Image:newshortcut.png]]<br />
* The following window will appear.<br />
[[Image:newshortcuthighlight.png]]<br />
* In the highlighted box, type in the '''full path of the DosBox .exe file, in quotes'''. For example, if you didn't change the defaults when installing DosBox, you will need to type ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe"</nowiki>'', assuming you are using version 0.72.<br />
[[Image:shortcutpart1.png]]<br />
* Next, type a space. Then, '''again in quotes, type the full path of the main game executable''', either .exe or .bat, which you want to run. For example, if you wanted to run The Settlers 2, which was installed in C:\Games\The Settlers 2\ (the .exe for which is called S2.exe) you would type ''<nowiki>"C:\Games\The Settlers 2\S2.exe"</nowiki>''.<br />
* Thus, the whole line would now read:<br />
** ''<nowiki>"C:\Program Files\DOSBox-0.72\dosbox.exe" "C:\Games\The Settlers 2\S2.exe"</nowiki>''<br />
[[Image:shortcutpart2.png]]<br />
* '''Click''' the highlighted "Next" button.<br />
* In the highlighted box on the next window, you can '''enter a name for the shortcut'''. Then, '''click''' the "Finish" button.<br />
[[Image:shortcutpart3.png]]<br />
* A shortcut should now be present in the folder where you originally right-clicked. To run your game or application, '''double click this shortcut''' as if it were a normal shortcut to a windows program.<br />
[[Image:shortcut.png]]<br />
* When you double click this shortcut, DosBox should launch and the game should be run automatically. If it does not, then you should double check that the paths which you entered when creating the shortcut are correct.<br />
* To view or change the properties of the shortcut, '''right click''' on the shortcut and '''click''' on "Properties".<br />
[[Image:properties1.png]]<br />
* The following window will appear. The "Target" box contains the command which you entered when creating the shortcut. '''Check that the paths are correct''' and that each part of the command has enclosing double-quotes.<br />
* '''Click''' OK to save any changes you make, or Cancel to discard any changes.<br />
[[Image:properties2.png]]<br />
* NB: If you use a custom configuration file (.conf file) for dosbox, then you will need to add the -conf command line argument between the path of the DosBox .exe and the path of the game .exe. See the last step of the short explanation to see what this should look like.<br />
<br />
= Other Operating Systems =<br />
* Similar operations should be possible on other operating systems, although this has not been tested directly.<br />
* '''Please note: if the game / application is located in a directory, or sub-directory of a folder which is automatically mounted, then the following technique will not work! Either remove any mount commands from the autoexec section of the default [[dosbox.conf|.conf file]], or use a custom [[dosbox.conf|.conf file]] when using the shortcuts which does not have any mounts. See the end of the short description for how to achieve this.''' If you don't understand this line, then it shouldn't affect you. If you havn't edited your [[dosbox.conf|.conf file]], then this shouldn't be an issue.<br />
* See the "short" tutorial in the windows section for an overview of the general concept.<br />
* Create a shortcut to the dosbox executable. Make the last argument the path to the game executable which you wish to run. Executing this shortcut should then launch the game automatically.<br />
* Under a linux / unix type system, the command would probably look similar to the following:<br />
** ''<nowiki>./usr/bin/dosbox ~/games/settlers2/s2.exe</nowiki>''<br />
* On OSX, use a command like this<br />
** ''<nowiki>/Applications/DOSBox.app/Contents/MacOS/DOSBox /Applications/DOS/tubworld.bat</nowiki>''<br />
<br />
<br />
= Within DOSBox it's self =<br />
<br />
* This will allow you to use a shortcut to your program using a batch file that you run in DOSBox it's self.<br />
* '''This way you can keep you mount setings'''<br />
* Create in the root directory of the folder you use primarily for DOSBox a text file and rename it [program].bat<br />
* Open it in notepad and type<br />
** ''@echo off''<br />
: ''cd [program file]''<br />
: ''[program]''<br />
* To run it (provided your autoexec has something like ''"mount C C:\folder"'', ''C:\'' and [program].bat is in C:\folder) just type [program].<br />
* So for theme hospital that would be 'hospital.bat' and<br />
** ''@echo off''<br />
: ''cd hospital''<br />
: ''hospital''<br />
* and to run it all you need to do is type 'hospital'.</div>HHaddow990