vDosPlus Advanced Tips
To make things easier for people to use vDosPlus, I am trying to collect various vDosPlus advanced tips in this page. You may find these information useful and handy. Some tips here contain the information written by Edward Mendelson and Carl Distefano.
If you want to use a Windows environment variable (e.g. %SYSTEMROOT% or %HOMEDRIVE%) in vDosPlus you must first explicitly declare it, either in autoexec.txt, in another batch file, or at the command line. The Windows variable must be surrounded by two percent signs on each side:
For example, before you can use %SYSTEMROOT% in vDosPlus, you must first declare it:
You can then use %SYSTEMROOT% in vDosPlus in place of the system drive.
Environment variables for use in vDosPlus may of course be declared in autoexec.txt using the same technique used in DOS and the Windows command prompt. For example:
In fact, you are strongly recommended to set an environment variable named %TEMP% that points to a temporary directory, possibly in the same location as the Windows temporary directory.
vDosPlus is a DOS emulator for Windows, which may map to actual Windows drives in its emulated DOS environment with its "USE" command. However, while Windows allows file names up to 255 characters, traditional DOS file names only allow up to 11 characters, with the first 8 characters as its main file name, and the last 3 characters as its extension. This is known as the short or 8.3 file names, in contrast to the Windows long filenames or LFNs. For example, "C:\Program Files" is a directory commonly seen in Windows, and it generally has a corresponding DOS 8.3 name called "C:\PROGRA~1". If there is also another Windows path named for example "C:\ProgramData", it probably has a corresponding DOS 8.3 name named "C:\PROGRA~2". In both real DOS environments or under DOS emulators such as DOSBox, "C:\PROGRA~1" and "C:\PROGRA~2" (or even "C:\Program Files" and "C:\ProgramData" if LFNs are enabled) will be seen using directory listing commands such as DIR. The DIR command in vDosPlus will display Windows-style long file names to the right of the DOS 8.3 names, similar to a Windows 9x DOS prompt or a real MS-DOS 7.10 environment with the DOSLFN driver installed. With this users will be able to find long filenames (as displayed in Windows) corresponding to their respective DOS 8.3 names easily.
Apart from its 4DOS 8.00 shell, which supports Windows-style long filenames, there are also many LFN-aware applications under DOS such as MS-DOS 7 EDIT, which will be able to see and operate with both the long filenames and their corresponding DOS 8.3 names. PKZIP/PKUNZIP 2.50, QuickView Pro 2.61, MPXPLAY and Doszip Commander are some other such examples (you can see even more examples at http://www.cn-dos.net/msdos71/doslfns.htm). Since vDosPlus provides supports for long filename functions, these programs will be able to see and operate with Windows-style long filenames (in addition to DOS 8.3 names) in vDosPlus directly. However, older DOS programs generally don't support Windows-style long filenames. Microsoft Word for DOS, Microsoft QBASIC and PKZIP/PKUNZIP 2.04 are such examples, which will only be able to see and operate with DOS 8.3 names. In such cases users must provide the corresponding DOS 8.3 names to them as their inputs. If a newer version of such a program is available which supports long filenames (e.g. PKZIP/PKUNZIP 2.50 instead of 2.04), it is recommended to use the newer version instead in order to support both Windows-style long filenames and DOS 8.3 names. DJGPP programs generally support long file names under DOS.
For DOS applications like DOS EDIT and XyWrite that "hook" into the keyboard INT9/IRQ1 interrupt, vDosPlus requires extra steps to support non-US keyboards. If your DOS application does not use keyboard INT9/IRQ1 handling, then vDosPlus uses the same keyboard layout as the host Windows system like in original vDos. If you wish to use a non-US keyboard with vDosPlus when the keyboard INT9/IRQ1 handling is involved, please download the FreeDOS keyb.exe and keyboard.sys from this link and copy them into your vDosPlus folder. Then add two lines to autoexec.txt (or another batch file) that will switch to the needed codepage and load the correct keyboard layout. For example, to use a Spanish keyboard layout, add these two lines:
KEYB SP,850 /9
Note that the "/9" switch is required. To use (for example) a French keyboard layout instead, simply change "SP,850" in the second line to "FR,850". To use a Czech keyboard, you need to use "852" instead of "850" and "CZ,852" instead of "SP,850".
Alternatively, you can download the more powerful FreeDOS xkeyb from this link and extract the files into some folder accessible from vDosPlus. For example, "XKEYB FR" will use the French keyboard layout. No other switches will be required for this command.
Furthermore, DIR and other commands display dates in the U.S. mm-dd-yyyy format by default. You can change the date format in vDosPlus by changing the country code using the COUNTRY command. For example, to use the International English dd-mm-yyyy date format you may want to set "COUNTRY 61" which changes the country code to 61 (International English). Also, to use the Japanese yyyy-mm-dd date format you can set "COUNTRY 81" which changes the country code to 81 (Japan).
Using vDosPlus' command-line options you can enable logging debugging information to a file and/or specify config file name and settings directly.
General syntax for vDosPlus: vDosPlus.exe [/log] [/cfg configfile] [/set config options]
[/log]: Logs debugging information to the file named vDosPlus.log
[/cfg configfile]: Specifies the name of the config file to use instead of config.txt
[/set config options]: Overrides the specified setting(s) in the config file
Example 1. To start a vDosPlus session using your current config.txt and autoexec.txt files:
Example 2. To start a vDosPlus session using your current config.txt and autoexec.txt files, and also logs debugging information to the file vDosPlus.log:
Example 3. To start a vDosPlus session taking config settings from config.new (not config.txt) and using your usual autoexec.txt file:
vDosPlus.exe /cfg config.new
Example 4. To start a vDosPlus session using your current config.txt and autoexec.txt files, but overriding the frame= and showital= settings in config.txt:
vDosPlus.exe /set frame=on; showital=off
Example 5. To start a vDosPlus session taking config settings from config.new (not config.txt) and using your usual autoexec.txt file, but overriding the frame= and showital= settings in **config.new**:
vDosPlus.exe /cfg config.new /set frame=on; showital=off
Example 6. To start a vDosPlus session using your current config.txt file but autoexec.new instead of autoexec.txt:
vDosPlus.exe /set autoexec=autoexec.new
Example 7. To start a vDosPlus session using config.new and autoexec.new:
vDosPlus.exe /cfg config.new /set autoexec=autoexec.new
Example 8. To start a vDosPlus sessions using config.new and autoexec.new, overriding the frame= and showital= settings in config.new, and also logs debugging information to the file vDosPlus.log:
vDosPlus.exe /log /cfg config.new /set autoexec=autoexec.new; frame=on; showital=off
Note: The DOS environment variable %WIN_VDOSPLUS% is set when vDosPlus starts, which contains the content of the Windows %VDOSPLUS% environment variable, or the command line of vDosPlus if the above options are not used. Moreover, you can also change most config settings in the DOS command line on the fly using vDosPlus' internal SETCFG command. Type "HELP SETCFG" in the DOS command line for a list of config settings supported by the SETCFG command.
Return to vDosPlus main page
Wengier, March 2017