DOSTIPS
DOSTIPS
DOSTIPS
�����������������http://www.mdgx.com/������������������
��������������������
Key Remapping + DOSSHELL Tips for the DOS fanatics ;-)
������������������������������������������������������
These topics refer STRICTLY to ALL Microsoft Windows 95/98/ME [a.k.a. MS-DOS
7.00/7.10/8.00] + MS-DOS 5.00/6.xx retail/final/gamma/Gold/RTM/OEM/MSDN
English releases, unless specified otherwise.
DOSTIPS.TXT Contents:
These key remapping tips are valid for ALL MS-DOS releases starting with 5.00
up to 8.00 [MS-DOS 7.00 is bundled with Windows 95 (retail) and 95a OSR1
(upgraded with SP1), MS-DOS 7.10 is included with Windows 95B/95C OSR 2.x and
Windows 98/98 SE(U) and MS-DOS 8.00 comes with Windows ME), and they work ONLY
on 101-107 (or more) extended serial, PS/2 and USB keyboards [with or without
extra Win95/Win98 WinKey (Windows Logo) keys], ONLY with an ANSI DOS CONsole
device driver/accelerator loaded in memory!
This may also be achieved using older or 3rd party DOS (DR-DOS, PC-DOS,
FreeDOS, Novell DOS, IBM DOS etc) releases, but I haven't tried any.
A MUST:
Microsoft REMOVED COMPLETELY the access to native/real/true/pure MS-DOS mode
from Windows Millennium Edition (ME), a.k.a. MS-DOS 8.00.
But you CAN get it back by applying the Unofficial WinME DOS Patch:
http://www.mdgx.com/dos.htm#ME
which modifies COMMAND.COM + IO.SYS (from C:\Windows\Command\EBD) +
REGENV32.EXE (from C:\Windows\System) to allow Windows ME to boot to native
MS-DOS and use custom DOS mode startup files (AUTOEXEC.BAT + CONFIG.SYS),
Windows 95/98 style.
The included KEY.TXT + X.TXT files are plain ANSI batch (ASCII text) files
designed to reassign the "extra" function keys: from F1 up to F12 on extended
keyboards, using ANSI driver capabilities.
FYI: If you don't know what these abbreviations mean: ASCII, ANSI, RAM, TSR,
UMB, USB, VGA etc, please look them up in GLOSSARY.TXT (included):
http://www.mdgx.com/glossary.htm
and/or online:
- Google:
http://www.google.com/
- Wikipedia:
http://www.wikipedia.org/
First you need to load Microsoft ANSI.SYS device driver in your CONFIG.SYS
with the /X switch, to enable DOS mode key remapping, AFTER the lines that
load the Microsoft HIMEM.SYS + EMM386.EXE "combo" or other 3rd party memory
manager capable of providing Upper Memory Blocks (UMBs) for loading
devices/drivers/TSRs "high": Uwe Sieber's UMBPCI.SYS, Symantec (Quarterdeck)
QEMM386.SYS, McAfee (Helix) NetRoom RM386.EXE, Lineo (Caldera) DR-DOS
EMM386.EXE, Qualitas (IBM) 386MAX.SYS etc.
MS ANSI.SYS occupies 4.2 KB of upper DOS RAM ONLY IF loaded with DEVICEHIGH
from CONFIG.SYS.
TIP: See MEMORY.TXT (included) for memory management guidelines to learn how
to MAXimize your memory resources in DOS + Windows 9x/ME.
DEVICEHIGH=C:\DOS\ANSI.SYS /X
DEVICEHIGH=C:\WINDOWS\COMMAND\ANSI.SYS /X
The "/X" switch allows extended keys to be remapped independently on 101 (or
more) enhanced keyboards.
CONFIG.SYS lines:
DEVICEHIGH=C:\DOS\ANSI.SYS /X
COUNTRY=040,852,C:\DOS\COUNTRY.SYS
DEVICEHIGH=C:\DOS\DISPLAY.SYS CON=(EGA,852,2)
INSTALLHIGH=C:\DOS\NLSFUNC.EXE C:\DOS\COUNTRY.SYS
AUTOEXEC.BAT lines:
CONFIG.SYS lines:
DEVICEHIGH=C:\WINDOWS\COMMAND\ANSI.SYS /X
COUNTRY=040,852,C:\WINDOWS\COMMAND\COUNTRY.SYS
DEVICEHIGH=C:\WINDOWS\COMMAND\DISPLAY.SYS CON=(EGA,852,2)
INSTALLHIGH=C:\WINDOWS\COMMAND\NLSFUNC.EXE C:\WINDOWS\COMMAND\COUNTRY.SYS
AUTOEXEC.BAT lines:
Alternatively you can use any other compatible ANSI device driver with the
built-in ability to remap the F1 - F12 extended keys and/or any other "normal"
keys (if you like) to replace Microsoft's default ANSI.SYS.
DEVICEHIGH=drive:\path\NANSI.SYS /X
LOADHIGH=drive:\path\ANSI.COM
You can use ANSI.SYS, NANSI.SYS or ANSI.COM ASCII sequences to create colorful
DOS prompts, start ANY DOS program [including Windows 3.1x/9x/ME GUI :)] at
the touch of a single key, by remapping the keys on enhanced 101-107 (or more)
keyboards, and much more.
IMPORTANT:
Sustitute ALL "drive" and "path" instances from ALL command lines in this
document with your ACTUAL drive/partition letters and directory/folder names,
respectively... and don't type the quotes! ;)
You can add this command as the last line in your AUTOEXEC.BAT:
TYPE drive:\path\KEY.TXT
After AUTOEXEC.BAT processing is finished (at the end of the boot sequence),
press one of your function keys (F1 through F12) at the native/real/true/pure
MS-DOS prompt, to start whatever DOS program you like (including internal
MS-DOS commands, like: COPY, DEL, DIR, REN etc), and ANY Windows version that
runs on top of MS-DOS (3.xx or 95/98/ME).
FYI: Windows NT, 2000, XP, 2003, Vista, 2008 + 7 have their own version of MS
ANSI.SYS, which can be loaded from a customized CONFIG.NT using the
DEVICE(HIGH) command, but key remapping canNOT be enabled, because these OSes
take over all hardware resources (the keyboard port + interrupt in this case),
thus disabling direct access to all DOS based software. :-(
To remap your keyboard in Windows 2000/XP/2003/Vista/2008/7/8/8.1/2012:
- see this guide:
http://www.ghacks.net/2010/06/06/the-ultimate-guide-to-keyboard-remapping/
- or this one:
http://www.ghacks.net/2009/01/02/remap-keyboard/
+ use SharpKeys (free):
http://sharpkeys.codeplex.com/
also here:
http://www.randyrants.com/2008/12/sharpkeys_30.html
To install + run DOS based programs + games from within Windows NTx (NT4,
2000, XP, 2003, Vista, 2008 + 7) OSes:
- use DOSBox (free GPL):
http://www.mdgx.com/dos.htm#BOX
- or install a Virtual Machine OS/software emulator [free(ware)]:
http://www.mdgx.com/xptoy.htm#VPC
CAUTION:
If using these function keys shortcuts from a Windows DOS box/session, be
CAREFUL which programs you run, so they won't interfere with Windows proper
operation. Programs that are Long File Names (LFNs) and/or FAT32/NTFS unaware
may DAMAGE your data under Windows 32-bit (Win32) OS, some may not run, or
even LOCKUP Windows!
To assign your own DOS commands to F1 - F12 in KEY.TXT, open it with EDIT.COM,
and type in the commands you want inside the quote-unquote areas ("PROGRAM" =
replace with your actual command/program/game name), to substitute the ones
already there.
LIMITATION:
You need to use EDIT.COM (MS-DOS default ASCII/text editor/viewer) or a
Notepad replacement that supports ANSI/DOS/OEM fixed pitch fonts, because MS
Notepad (Windows default ASCII/text editor/viewer) does NOT display extended
ASCII characters properly, like the ones I used in my KEY.TXT, X.TXT,
AUTOEXEC.BAT + CONFIG.SYS files (all included).
$e[0;134;"WIN";13p
Make sure the DOS executables (.COM, .EXE) or batch files (.BAT) listed in
KEY.TXT reside in directories included in your PATH statement (set in your
AUTOEXEC.BAT or CONFIG.SYS), otherwise you need to add their actual paths
(drive/partition letter + directory/folder name) to the KEY.TXT command lines:
"drive:\path\PROGRAM"
Make sure you have a copy of the COMMAND.COM file present in the root
directory of your boot drive/partition (default is C:\) for this to work!
Save your CONFIG.SYS file when done (BUT BACK IT UP FIRST!), and then reboot,
so the new command environment can take "charge".
You can also redefine ANY key functions from the DOS prompt.
Just run something like this:
PROMPT $e[0;59;"MSD";13p
PROMPT $e[0;59;;p
When done, you need to reenable your original DOS PROMPT (default is C:\>), by
running:
PROMPT $P$G
To avoid such cumbersome changes to your DOS prompt, I recommend loading key
remapping settings from your AUTOEXEC.BAT by using KEY.TXT (example):
TYPE drive:\path\KEY.TXT
FYI: "$e" is equivalent to using the "Esc" ASCII 27 character. To save memory,
press and hold (in this specific order): Ctrl, P and the left square bracket
([) keys together in EDIT.COM to reproduce "$e" as a single character, which
looks like a left pointing arrow.
You can assign DOS commands to ANY key on your keyboard as long as it doesn't
interfere with any other functions that particular key might have (e.g. some
of the function keys are remapped by Microsoft DOSKEY.COM TSR driver).
To remap a key you need to learn its ASCII code. To observe the ANSI escape
sequences, run:
HELP ANSI.SYS
MSDOSDRV.TXT
Look at the ASCII codes by scrolling down towards the end of the ANSI.SYS
topic. NANSI.SYS and ANSI.COM also abide by the same standard rules.
LIMITATION:
Alt, Ctrl, Shift, Win95/Win98 (Windows Logo = WinKey), Menu and other
custom/proprietary/3rd party keys on 104+ keyboards are the ONLY ones that
canNOT be remapped this way!
Then open KEY.TXT with EDIT.COM in DOS or Notepad in Windows, and change a
key's ASCII code to the one you want, to have that particular key start your
favorite DOS program, or even start Windows from native MS-DOS. Example:
change "WIN" to "MSD".
To run certain DOS programs that rely on their own key mapping routines, you
may need to temporarily disable key remapping and revert back to their
original DOS key assignment. For this purpose I have created X.TXT (included).
Run the following MS-DOS command to "deactivate" (restore) all remapped keys:
TYPE drive:\path\X.TXT
FYI: Keys remapped/restored this way from a DOS box within Windows GUI apply
ONLY to that particular DOS session. To make ALL remapped keys "globally"
available to the system, run these commands from native/real/true/pure MS-DOS
(outside Windows), or add them as last lines to your AUTOEXEC.BAT file.
You can also add the lines below to a batch file to start your favorite DOS
program/game, to temporarily disable key remapping (by loading X.TXT), run
your application, and then add another TYPE command for KEY.TXT after your
program's command line, to reassign your keys once again. Example:
@ECHO OFF
TYPE drive:\path\X.TXT
drive:\path\PROGRAM
TYPE drive:\path\KEY.TXT
You can rename X.TXT and/or KEY.TXT to whatever you want, just keep the .TXT
extension for convenience. ;)
It's cool to assign your most used DOS commands to the function keys (F1 -
F12), for running them with just a single keypress, thus saving precious time,
and working more productively, instead of typing cryptic DOS commands that
most of us don't need to remember anyway. [DOS fanatics make exception! :-)]
With ANSI.SYS (or similar driver) installed you can also benefit from being
able to display custom colored DOS prompts, using the ANSI graphic escape
sequences. For a few examples, take a peek at my CONFIG.SYS + AUTOEXEC.BAT
files (both included) "SET PROMPT=" and "SET WINPMT=" lines, especially if
you are a DOS afficionado, and you'd like to have fun(k)y looking/colored DOS
prompts, like I do. ;)
Another example of cool DOS prompt, in which you can change different ANSI
parameters to obtain "exotic" color effects and/or force the prompt bar to
"dock" at the bottom of the screen instead of at the top: [;-)]
Replace "My PC" and "WinDOwS" strings above (without quotes) with your own
personalized text.
And make sure your COMMAND.COM environment size is large enough to accomodate
this long string, by adding/modifying the CONFIG.SYS "SHELL=" line (see
examples further above).
FYI:
DosShell does NOT work from within Windows NTx OSes
(NT/2000/XP/2003/Vista/2008/7/8/8.1/2012) because they do NOT allow direct
access to hardware resources!
Its main purpose is file and directory listing and manipulation (copy, create,
delete, move, rename), program launcher (shell menu) and task swapper (program
switcher).
Two different directory trees (even located on different drives/partitions)
can be displayed simultaneously, together with the launcher menu, all on the
same screen.
Task Swapping is an added bonus, making possible to load multiple
programs/games in memory at the same time, and switching between them with the
Alt+Tab key "combo". But because MS-DOS is a single task operating system and
doesn't provide background execution nor multi-threading, only the currently
selected application can load into memory and run. DosShell's Task Swapper has
the ability to dump the running program together with its operating state to a
temporary disk file (DOSSWAP.SWP) and then load and run another program in the
same memory space. When switching between tasks, the current task state is
dumped to this file, and the other program operating state is loaded from the
file, making possible to continue with the other task.
CAUTION: DosShell is NOT capable of terminating hung/locked up applications.
Therefore if using task swapping make sure to save your work BEFORE switching
tasks!
But MOVE (unlike DOSSHELL) canNOT rename the currently displayed directory or
the directory inside which it resides. :(
DOSSHELL does NOT use ANY MS-DOS built-in (internal) commands like: COPY, DEL,
REN, MD, RD etc, but its own (native) routines for performing such tasks
instead.
LIMITATIONS:
* DOSSHELL is NOT Long File Names (LFNs) aware! Therefore ANY LFN
files/folders copied/moved by DOSSHELL will LOSE ALL LFNs information [will be
truncated according to DOS based 8.3 Short File Names (SFNs) format] IF using
Windows 95/98/ME or ANY other LFNs capable OS/Environment!
* If free conventional ("low") DOS memory is less than 600 KB, DOSSHELL will
display this warning popup message and may not list all files if a
(sub)directory contains 2000 files or more:
"Not enough memory. Operation cannot be completed."
For all MS DOSSHELL users I have included here my customized DOSSHELL.INI file
containing a list of 7 "fun(k)y" customized color schemes. Enjoy.
To use it, first BACKUP YOUR DOSSHELL.INI (e.g. rename it to DOSSHELL.INX),
and then copy this one to your DosShell directory.
Just make sure DOSSHELL is NOT running. :)
Now to preview/change to one of my DOSSHELL color schemes: run DOSSHELL ->
click Options -> select Colors -> scroll down to the desired color scheme ->
click Preview -> click OK/hit Enter to keep it if you like it, or click
Cancel/hit Esc to restore your original one.
COLOR
darkCOLOR
brightCOLOR
Substitute the COLOR string above with an actual color name from the list
below [0 - 8]. Supported DOSSHELL color names (the 16 standard VGA color
attributes):
0 = black
1 = blue
2 = green
3 = cyan
4 = red
5 = magenta
6 = yellow [or brown]
7 = white
8 = gray
9 = brightblue
A = brightgreen
B = brightcyan
C = brightred
D = brightmagenta
E = brightyellow [or brightbrown]
F = brightwhite
You can substitute bright with dark to get even more color combinations.
SET DOSSHELL=C:\SHELL
To start DOSSHELL in different text or graphics video modes, you can run the
DOSSHELL executable from the DOS prompt (or from a dedicated batch file) with
command line parameters. To see all its available switches, run:
DOSSHELL /?
These are all available DOSSHELL video modes that can be specified as command
line parameters (case insensitive):
Note that not all DOSSHELL graphical resolutions may be available on your
computer, depending on the video modes supported by your video controller.
You can also change the DOSSHELL screen resolution from within its interface:
click Options -> click Display -> highlight desired resolution -> click
Preview -> click OK/press Enter to select or Cancel/press Esc to revert to
previous setting.
If you are trying to preview a resolution not supported by your video card,
you may get a black or garbled screen. In this case the only way to return to
the previous display is to hit Esc, ONLY IF your PC didn't freeze in the
process. :(
It is strongly recommended to (re)install the DOSSHELL video files properly by
running SETUP.BAT (see the "UPDATE" below) EVERY TIME you change/upgrade your
primary (2D) video adapter, to avoid such errors/lockups.
Microsoft suggests not to use DOSSHELL as a DOS menu (shell) to start other
GUI based applications/games (i.e. Windows) if using MS-DOS 5.00 or earlier.
I for one prefer QuikMenu III DOS graphical menu for this purpose:
http://web.archive.org/web/20090505071557/http://www.neosoftware.com/qm.html
QuikMenu III [511 KB, nag shareware :-(]:
http://web.archive.org/web/20090505071557/http://neosoftware.com/software/qm.zip
and have erased the entire DOSSHELL.INI MENU section, which also makes
DosShell load faster by reducing the size of DOSSHELL.INI.
If you decide to use my DOSSHELL.INI file, you should be WARNED that I have
eliminated ALL nagging screens for Mouse Operations, Copy, Move, Delete and
Replace commands. Example: when you highlight a single file/empty directory
and press the Del key or click Delete, it WILL BE DELETED IMMEDIATELY WITHOUT
ANY CONFIRMATION prompts/messages!
You can change these lines under the DOSSHELL.INI [savestate] section:
[savestate]
replaceconfirm=disabled
deleteconfirm=disabled
mouseconfirm=disabled
[savestate]
replaceconfirm=enabled
deleteconfirm=enabled
mouseconfirm=enabled
to get back the confirmation/nagging screens (default) for safer (but more
time consuming) copy/move/delete/mouse operations. [But that's no fun! :)]
You can also enable/disable DOSSHELL confirmation dialog boxes from within its
GUI: click Options -> click Confirmation -> (un)check the desired [X] box(es)
-> click OK/press Enter to save new option or Cancel/press Esc to revert to
previous setting:
- Confirm on Delete
- Confirm on Replace
- Confirm on Mouse Operation.
association=
{
program=EDIT
extension=BAT
}
- .BAT
- .DOC
- .INF
- .INI
- .SYS
- .TXT
Note that DosShell canNOT run ANY Windows native programs and does NOT support
file associations with Windows executables, even if running from a DOS
box/session/window within Windows!
I have also associated the MS-DOS:
- .HLP files with HELP.COM (MS-DOS Help system executable).
- .BAS files with QBASIC.EXE (MS-DOS Quick Basic Editor/Viewer executable).
All these files should be found in the DOS directory (MS-DOS 5.00 - 6.22) or
in the %winbootdir%\COMMAND folder (Windows 95/98/ME).
I have also associated .ZIP files with PKUNZIP.EXE, which must reside in a
directory on your PATH, otherwise you need to type its full path name for this
association.
PKZIP.EXE + PKUNZIP.EXE are part of PKWare PK(UN)ZIP v2.50 16 + 32 bit, THE
standard DOS ZIPping/unZIPping tools, LFNs compliant ONLY in a Windows
95/98/ME DOS box [203 KB, no nag shareware]:
http://www.filegate.net/pkware/pkdos/PK250DOS.EXE
Similar DOS tools:
http://www.mdgx.com/dos.htm#ZIP
This way I unzip (decompress) a .ZIP file simply by double-clicking on it
while in DOSSHELL, restoring the original files contained in the ZIP archive
into the directory where the respective .ZIP file resides.
To force the files contained into a ZIP archive to decompress into the
directory of your choice, you can associate ZIP files with a BATch file I
called UNZIP.BAT (example):
@ECHO OFF
C:\ZIP\PKUNZIP.EXE %1 %TEMP%
EXIT
In this case all files in a ZIP will be unZIPped into the TEMP directory,
specified by the "SET TEMP=" and "SET TMP=" variables (example):
SET TEMP=C:\TEMP
SET TMP=C:\TEMP
FYI: DOSSHELL is NOT included with MS-DOS 6.21, 6.22 or with Windows
95/98/ME anymore, therefore you need to download its Setup files from
Microsoft [762 KB, free]:
http://download.microsoft.com/download/win31/Update/1/DOS/EN-US/sup622.exe
as part of Microsoft MS-DOS 6.22 Supplemental Disk:
http://support.microsoft.com/kb/117600
if you own one of these "DOSSHELL crippled" Operating Systems.
More info:
http://www.microsoft.com/technet/archive/msdos/01_intro.mspx
MS-DOS 6.22 required to use most Supplemental files!
MS-DOS 5.00/6.xx or most any Windows OS required to use DOSShell!
UPDATE:
"Run the SUP622.EXE executable to extract the DOSSHELL installation files.
Beware that SUP622.EXE does NOT contain ANY text references on how to install
the DosShell video files, therefore you need to run SETUP.BAT, a DOS batch
file that installs DOSSHELL.VID and DOSSHELL.GRB on your system.
Only after that, you'll be able to run DosShell in graphic modes. SETUP.BAT
basically copies the DOSSHELL files to your DOS directory and renames the
appropriate *.VID and *.GRB files to DOSSHELL.VID and DOSSHELL.GRB
respectively, depending on your computer's video capabilities."
[Thank you Chris!]
TIP: You may need to create a new DOS (or MSDOS) directory (if not present) on
your root drive/partition (C:\) beforehand for SETUP.BAT to work properly.
WORKAROUND:
DosShell is configured by default (on most newer ISA/VLB/PCI/AGP color video
adapters that support it) for the better quality VGA display. If your older
and/or monochrome (CGA, EGA, MGA, PGA, 8514 etc) graphics card does NOT
support VGA modes, you MUST install the appropriate DosShell video (.GRB and
.VID) and initialization (.INI) files from SUP622.EXE (self extractive ZIP
archive), depending on your video controller capabilities.
Select ONLY the files that MATCH your particular video type:
Then move all these 3 DOSSHELL.* files to your DosShell directory, which
should be listed in your PATH for convenience, to run DosShell anytime, from
any drive/directory, and avoid using a "SET DOSSHELL=" statement.
Finally, type DOSSHELL [or include all necessary command lines in a dedicated
DOS mode batch (.BAT) file] from any DOS command prompt and hit Enter to start
the DosShell GUI.
In Windows 3.1x/9x/ME, just create a shortcut/item (.PIF file) for this batch,
to expedite things even further.
This is the batch file I use to start DosShell (DSHEL.BAT), located in
C:\SHELL (example):
@ECHO OFF
IF "%OS%"=="Windows_NT" GOTO END
SET DOSSHELL=C:\SHELL
C:
CD\SHELL
IF "%windir%"=="" GOTO D0S
C:\SHELL\DOSSHELL.EXE /G:H2
GOTO END
:D0S
C:\SHELL\DOSSHELL.EXE /T:H2
:END
SET DOSSHELL=
CLS
EXIT
DSHEL.BAT checks for Windows 3.1x/9x/ME GUI presence, starts DosShell with the
appropriate video resolution (VGA or CGA in these cases), and finally exits
automatically after I close the DosShell interface manually by pressing F3,
returning control to the running OS.
You can further modify DSHEL.BAT to suit your particular needs (using Notepad
in Windows or EDIT.COM in DOS), especially if using more than one different MS
OS in dual (multiple) boot setup. Just make sure to change all drive/partition
letters and/or directory/folder names to MATCH YOUR specific configuration.
Have fun.
______________________________________________________________________________
������������������������������������������������������������������������������