The magazine of the Melbourne PC User Group

Members' Tips 'n' Tricks
Ron Taylor

I must confess that I am really looking forward to receiving this edition of the magazine-my favourite theme, Multimedia. Of the two major techno advances in the future of PCs, "MM" and the much vaunted "Information Highway," MM is the one to watch. It is here now, it is inexpensive and it is good. When the III gets going properly, if ever, it too will be driven via the features of Multimedia.

Through MM we get the benefits of fully interactive data, sound and video on our PCs. Yet to me, the most practical aspect is the storage medium commonly used the C D-ROM. These things are really useful. Over the past three years our household collection of perennial classics (consuming a 2 x 2 metre bookcase), has almost been made redundant by a small stack of thin plastic discs. Most of these new "books" can "talk", and some of the pictures can "move"! As for software applications on CD-ROM, I use the popular MS Office suite, getting context-sensitive, fully cross-referenced (hypertexted) help directly from any one of the manuals takes 15 seconds at most.

Yes, having up to 650 MB of permanent storage on a "floppy" has its benefits. For interest, the largest capacity CD-Reader available now holds no less than 200 discs, daisy chained 4-up this gives a stunning 520 GB available to a PC. (This equates to approx 200 million A4 pages of text). The mind boggles! I will hunt around for some Tips for MM users and see what we can dig up. Meanwhile...

Protect your HD Root Directory
by Terry Day


If you are logged into the root directory of your hard disk, and issue the command DEL *.*, some important files that are needed to start your computer are erased. The next time you start your computer, you will find yourself unable to access your hard disk.

One way of recovering from this situation is to make a floppy disk that contains DOS and a copy of all the files in the hard disk's root directory. You can then boot your PC from this floppy, copy all the relevant files back to the hard drive, reboot your system again and you are back in business. I use this procedure as one method of protecting my data, and a number of writers have covered it in detail in various articles in PC Update.

The only problem with this solution is that it requires you to keep the "recovery floppy" up to date if you change AUTOEXEC.BAT, CONFIG.SYS, your DOS version, or add new files or drivers to the root directory. It's so easy to forget this.

I use another procedure to protect my root directory files. It is very simple to set up, so is applicable for beginners, yet is so effective that advanced PC users will find it attractive. Updating it can be made part of the close-down procedure for your PC, so it is easy to keep the protection current.

This involves a few simple steps. In my example, I assume that your system boots from drive C. If your system boots from another drive, substitute that in the following instructions. Firstly, you need to make COMMAND.COM, the DOS file in your root directory to be read-only. You can do this via the ATTRIB command, or by using your favourite utility that can change the attributes of a file. If you want to use ATTRIB, type the following command:

ATTRIB +R C:\COMMAND.COM

This protects COMMAND.COM from being deleted by a DEL *.* command, as DEL will not delete read-only files. The computer will not boot properly if COMMAND.COM is deleted because this file helps create the important link between the hard disk, the system memory, and the keyboard. If this file is protected, the system will boot after a DEL *.* and you will be able to access the hard disk at a basic level.

However, we need to provide some way to protect AUTOEXEC.bat, CONFIG.sys and any other files in the root directory. Setting their attributes to read-only is not a good idea. When a new software program is being installed, it often needs to modify these files, and the installation may fail if they are read-only.

The best protection method is to copy all files from the root directory into a backup directory on the hard disk. Then, a simple copy operation can restore the root directory files if they are deleted. You will be able to perform this copy operation because the read-only protection of COMMAND.COM will give you the access you need to the hard drive to do it!

On my system I have created a directory called \OOPS (I wonder why I used that name?), and have a close down system option on my menu which performs the DOS command:

COPY C:\*.* C:\OOPS

This makes a backup copy of all my root directory files into the \OOPS directory every time I prepare to turn my system off. Another command, SMARTDRV /C also flushes my disk cache at the same time. If I ever do the fatal DEL, I only need to execute the command:

COPY C:\OOPS\*.* C:\

and reboot my PC and have everything working fine again. If you use disk compression, like Stacker or DoubleSpace, the method works because the drivers for the compression scheme are hidden files that cannot be erased by DEL.

I developed this idea from a magazine tip about using attributes to protect files. I hope it helps readers of PC Update and strongly suggest that beginners install it because it is simple, yet completely safe and effective.

Windows Startup Configurations
by Bernadette Houghton


This is a very basic tip which may be useful if you sometimes want to start up windows with different applications loaded. In my case, during the work week I occasionally need to run my fax software which adds about 45 seconds or so to Windows start up time, as well as taking up extra memory resources. But, rather a pain when I don't want or need the fax, especially since I tinker around a fair bit and often need to exit and restart multiple times during a session. Here is a simple way to get around it:

Set Windows to start up with one configuration, e.g. with your fax software loaded in your Windows StartUp Group.

Copy STARTUPGRP (in the Windows directory) to another *.GRP name, e.g. FAX.GRP

Set Windows to start up with your other configurations, e.g. with no fax software loaded.

Copy STARTUPGRP to another *.GRP name, e.g. NOFAX.GRP

Create a batch file for each configuration which copies over your desired configuration to STARTUPGRP and then starts Windows, e.g.
rem FAXWIN. BAT 
@echo off 
cd\windows 
copy FAX.GRP STARTUP.GRP 
WIN

Add options to your menu system (boot-up or otherwise) to run the alternative configuration by its batch file. Voila - frustration resolved!

Countdown Delay 
by Alistair Lloyd


Even I don't run Windows all the time. Although My AUTOEXEC.BAT calls Windows, I used to have a PAUSE statement just before it executed Windows, in case I wanted to break out and use DOS directly. Recently at work, we had a similar situation where we wanted to be able to know that if a PC booted overnight (due to a power loss or system crash), that it would start up the application we had set it to run, without anyone in attendance.

Similarly, we also wanted to be able to boot the system ourselves, and not have to break in during the reboot. I developed a "Count Down" program which will allow a delay which gives the PC user a chance to "break out" of the automatic start up, before an application is launched. This system uses a combination of a DOS batch file and a QBasic program to achieve this. Put this in any directory in your path.

rem CDOWN.BAT 
@ECHO=OFF 
IF EXIST C:\CDOWN.TMP DEL C:\CDOWN.TMP  
QBASIC /RUN C:\BAS\CDOWN.BAS  
IF NOT EXIST C:\CDOWN.TMP WIN 
IF EXIST C:\CDOWN.TMP DEL C:\CDOWN.TMP
CLS 
ECHO. 
ECHO Welcome to DOS!

rem CDOWN.BAS 
REM Put this in your C:\BAS directory 
CLS 
PRINT "Press SPACE BAR to" 
PRINT " abort count down..
PRINT 
WHILE INKEY$ "" : WEND 
FOR CC = 10 TO 0 STEP -1 
   PRINT CC; "..."
   IF INKEY$ = " " THEN
      SHELL "ECHO.C:\CDOWN.TMP" 
   SYSTEM 
   END IF 
   FOR DUM = 0 TO 5000 
   NEXT rem 
   Delay loop...
NEXT 
SYSTEM

If the CDOWN Batch file is appended to your AUTOEXEC.BAT file the system will clear the screen and count from 10 down to 0 before executing Windows. To fine tune this to your system, you will need to change the WIN command to DOSSHELL, or whatever menu system you call from AUTOEXEC.BAT. You may also want to change the two delay loop figures in the Basic listing depending on the speed of your PC. I find that 10 to 0 and 0 to 5000 works fine on my 486DX/33.


The Substituted Drive Screens worth Capturing
by Alistair Lloyd


I was taught as a child, "A place for everything, and everything in it's place". This, while used as a sound philosophy for keeping my room tidy, has followed me through the years in my attempts at DOS file management. Most users will have created directories and sub-directories to store files of a common application; Batch files in one, Lotus files in another, "Doom" in a hidden read-only directory where the boss can't find it, etc.

When I bought my new computer I swore I would do the same. So I created a directory called ALWORK, to store any projects I would be working on at home. Then, knowing I would be using a lot of files temporarily I created a TEMP subdirectory under that. To do some recent BBS work, I created BBSWORK underneath TEMP, and MULFILES underneath BBSWORK.

Now, having to type

CD C:\ALWORK\TEMP\BBSWORK\MULFILES

became a bit of a task, so rather than risk getting RSI (Ridiculous Subdirectory Illness), I opted to add a new drive to my system-the cheap way! By adding a SUBSTitute line to my AUTOEXEC.BAT, I can save keystrokes and time by referring to this sub-directory set as another disk drive. Simply put, it becomes:

SUBST E: C:\ALWORK\TEMP\BBSWORK\MULFILES

I can then change to that directory, or refer to files in it, by selecting E: at the DOS prompt. There are some things to look out for. Ensure that your LASTDRIVE setting is appropriate. If you have enough memory, you can use SET LASTDRIVE=Z in your CONFIG.SYS. Typically, you may only need to set LASTDRIVE to say E or F, depending on the number of "logical" and "physical" (i.e. fake and real) drives you wish to address. I have LASTDRIVE set to K, for no apparent reason.

Things you can and cannot do with a substituted drive: You can create and delete subdirectories with them, Windows will recognise them as fair-dinkum devices, and even MSD is clever enough to know what they really are. You cannot CHKDSK or SCANDISK them, you cannot delete the true directory name while your DOS prompt is pointing to that drive and you can't have two subdirectories with the same substituted letter.

Some other hints: Use the SUBST command by itself to check on what drives are currently substituted. Use SUBST <d:> /D to unsubstitute a drive letter. Or, on a more clever note, use the undocumented DOS command:

TRUENAME <d:>

to find the full name of your substituted directory.

Screens worth Capturing
by Ron Taylor


Unfortunately, with graphics screens, Windows only allows you to grab either the whole screen or the active window. Much more versatile is the shareware program Paint Shop Pro (from JASC, Inc), this allows you to capture anything from full-screen to any small area. Images can be modified in various ways, as well as converted and saved in a variety of formats, not just bitmap (.BMP).

When grabbing fancy screens running under DOS, one of the better utilities around is Screen Thief (by Adrian Mardlin), an excellent little program which will grab the full screen in text or graphics mode and save it for you as a colour graphic file in your preferred format.

For basic text mode screens in DOS there are scores of good programs around. From the many I have tried, by far the handiest title in this category is Snipper (by Tom Kihlken), a TSR utility that occupies only 4208 bytes of conventional or upper memory.

This little beauty allows you to mark any part of a text screen and save it to a file, send it to the Printer, or copy it into a memory buffer to be pasted "as is" into another program as needed. Another nice feature is that the text can optionally be pasted in "quoted" format, great for users of BBS Oflline Mail readers such as B1ueWave which do not support cutting and pasting into your message Editor.

All of these fun toys are available on the Melb PC BBS. Don't forget to to send the authors their beer money if you keep using their good work, they sure deserve it! Besides, it keeps them at their keyboards, and we get better and better software to use.

Many thanks to the members who have taken the time and shared their helpful ideas with us here. Bye 'till next month! 

Reprinted from the August 1994 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[About Melbourne PC User Group]