www.delorie.com/djgpp/v2faq/faq189.html | search |
| Previous | Next | Up | Top |
First, you must set the option in the Windows registry which prevents it from using numeric tails when it invents short 8+3 aliases for long file names. When numeric tails are enabled, and a file with a long name is created, Windows generates a short 8+3 alias for that long name by attaching a numeric tail ~N to the first 6 characters of the basename. For example, a file called ALongFileName.LongExtension will get a short alias alongf~1.lon. When you then reboot into plain DOS, your programs will see this short version only, which will almost certainly break them, since, when a program running under DOS asks for a file with the above long name, DOS transparently truncates it to alongfil.lon, and such a file does not exist. Disabling the numeric tails forces Windows not to use numeric tails unless there is another file in the same directory whose short alias clashes with that of the new file. If no such clash happens, Windows will simply truncate the long name as DOS would, which is exactly what you want. Here is how you disable the numeric tails on Windows 9X:
HKEY_LOCAL_MACHINE
branch of the registry until you see in the left pane an item called HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
, then
click on it.
FileSystem
key. If you don't see an item there called NameNumericTail
, select "New", "Binary Value" from the
"Edit" menu, then type NameNumericTail and it will appear. Now double-click on NameNumericTail
and enter a value of 0.
NameNumericTail
to 0 breaks some programs, you can restore its original setting temporarily, while you run those programs. NameNumericTail
only affects the short
names of new files being created, it has no effect on the files that already exist.(Note: For some reason, Microsoft doesn't like it when users disable numeric tails. Several Microsoft
publications warn against doing that, and I'm told that Windows 98 has made it harder to disable them. I'm not sure why do they object so much. Presumably, some programs rely on certain directories
to have numeric tails, so that they could be found even in plain DOS mode. Apparently, some of those programs have short aliases such as PROGRA~1 (the short version of the Program
Files directory) hard-wired into them, and Microsoft is afraid you could reinstall or move those directories when numeric tails are disabled, and thus cause such programs not to find their
"home". It is obvious that such programs are badly broken (e.g., the short alias could easily be PROGRA~2), and you have every right to yell at the vendor who sells them to you. But
even if you have no other way than to live with them, my experience shows that you have nothing real to worry about. Remember: numeric tails only have effect when files are created or renamed. So,
if you want to be on the safe side, re-enable them before installing Windows software, especially if the programs you install need to run in DOS mode as well (a typical example would be a
disk-recovery package such as Norton Utilities). Then disable numeric tails again, once the installation is over. For what it's worth, I always run my system with numeric tails disabled, and I have yet to see a single real problem.)
Besides the numeric tails, you need to make sure any files and directories you create have unique 8+3 aliases which are true truncations of the long names to 8+3 limits. This means that you should avoid file names with leading dots, such as .emacs and .bashrc, file names with more than a single dot, like make-3.77.tar.gz, or file names which include characters not allowed by DOS, like libg++.a.
One other problem is to avoid using programs which create numeric tails even if they are disabled in Windows. One such program is pkunzip version 2.50. Don't use it, if you want to keep your dual DOS/Windows installation in working order.
The most simple method of deciding at boot time which configuration (DOS or Windows) to start is to edit the (hidden) file MSDOS.SYS, which is a text file in Windows 9X, and force the Windows boot process to present a menu where one menu item, called "Command Prompt Only", allows you to start DOS 7 without the Windows GUI. To this end, change the line of MSDOS.SYS that reads "BootMenu=0" to say "BootMenu=1" instead, and reboot.
webmaster donations bookstore | delorie software privacy |
Copyright ⌐ 1998 by Eli Zaretskii | Updated Sep 1998 |
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)