Superscrub Your Drive Automatically
Scott Dunn, PCWorld
For years, Windows NT users have been able to use the command line to delete temporary files automatically. Now Windows 2000 and Windows Me let you fine-tune the process by using the Disk Cleanup tool's Task Scheduler to perform such disk-keeping chores as emptying the Recycle Bin and deleting offline network files, cached Internet files, and indexed catalog files.
Choose Start, Run, type cleanmgr /sageset:1, and press Enter. The number 1 in the command line can be changed to any number you choose from 0 to 65535, each representing a separate custom cleanup style that you can record and invoke at any time. In the Disk Cleanup Settings dialog box, check the items you want deleted. When you're done, click OK to store the settings in the Windows Registry. To make Disk Cleanup run with the new settings, choose Start, Runand type cleanmgr /sagerun:1 (replacing 1 with the number you specified in the /sageset switch). Note: When you customize Disk Cleanup this way, it unfortunately acts on all drives rather than prompting you for a specific drive to clean up.
You can, however, use this technique to create a shortcut containing custom cleaning settings. For example, to make a shortcut that deletes only Internet Explorer cache files, enter cleanmgr /sageset:2 (or another number) in the Run box as explained above, and press Enter. Check Temporary Internet Files and confirm that everything else remains unchecked. Then click OK. Next, right-click the desktop (or the folder that will hold your cleanup shortcut) and choose New, Shortcut. In the command line, type cleanmgr /sagerun:2 (use the same number here that you used earlier), and click Next. Type a name for your shortcut such as Destroy IE Temp Files, and click Finish. Next time you double-click the icon, your temporary Net files will be history.
To make Windows delete these files automatically at a preset time, choose Start, Programs, Accessories, System Tools, Scheduled Tasks. Select the icon you just created and drag it into the Scheduled Tasks folder window. Double-click the icon, click the Schedule tab, and specify when you want your custom cleanup shortcut to run. Then click OK and close the Scheduled Tasks window. Henceforth, your custom cleanup will occur on the schedule you established.
For more information, check out last February's Windows NT column.
Quicker Printing From Your Portable Computer
You use your laptop on the road, but you probably print the documents you've been working on at home or in the office. How do you remember which files need to be printed and where the files are located? Timothy Luoma of Gainesville, Florida, suggests having Windows pause printing until you reconnect to the printer. The details vary from one version of Windows to the next, but the steps are about the same.
Before you start working, choose Start, Settings, Printers. Right-click the default printer (the one you normally print with), and choose Work Offline or Use Printer Offline (for a networked printer) or Pause Printing (for a local printer). You can do this at any time, whether before you disconnect the machine from your printer or after you've left the office. When you do your work, choose the File, Print command as soon as your document is ready for printing, just as you would if the printer were still available. The printer icon will appear in the tray area near the clock on the taskbar, but no error messages about its inability to print will appear. Double-click the icon to see a log of the files you'll print later. If you decide not to print an item, select it in the printer window and press Delete. If you're using Windows 98 SE or Windows Me, the OS will remind you that you have jobs to print the next time you reboot. The Printers Folder will tell you how many jobs are in the queue, and you'll be prompted to print them, delete them, or leave them paused.
Once you reconnect your portable computer to your printer, you can tell Windows to print any or all of the items. In Win 98 SE or Me, simply click Yes to answer the prompt that appears after you double-click the printer icon on the taskbar. If you don't see a printer icon there, choose Start, Settings, Printers and double-click the appropriate icon in the Printers window. Deselect Printer, Work Offline or Printer, Use Printer Offline (for a networked printer) or Printer, Pause Printing (for a local printer) to return to your normal printer setting. In some versions of Windows, your documents will begin printing immediately. In other versions, you must select all the print jobs you want to print, right-click a selected item, and deselect Pause Printing to disable the pause for those documents. Voilą! Nous avons beaucoup des printouts!
Make Scanreg See All Your Backups
In a previous Windows Tips column, you described how to increase the number of Registry backups by editing the scanreg.ini file [ "Better Automatic System Backups," August Windows Tips]. I changed the default setting from five to ten, but when I tested it from the command prompt, I still got only the last five to choose from. What's up with that?
John Kight, Phoenix
A flaw in ScanReg, that's what. There are two versions of ScanReg: One runs in Windows, and the other runs in DOS. The Windows version of the Registry Checker Tool (scanregw.exe, or ScanReg for short) doesn't give you many options--it merely scans the Registry for problems and, if it finds none, offers to make a Registry backup for you. The version that runs in DOS (scanreg.exe) does a bit more, though not much. For example, it shows you a list of recent Registry backups and restores the one you choose.
To see how this works in Windows 98, reboot your computer, press F8 at the start-up screen, and then press 5 to choose the Command prompt only option. Once you reach the C:> prompt, type scanreg and press Enter. Follow the prompts on screen to have ScanReg analyze the Registry. If ScanReg doesn't find a problem, it will present you with a "Good Registry" screen; choose View Backups (or press Y) to see a list of recent backups. Unfortunately, as John discovered, ScanReg can't show you more than five backups--regardless of the number of backups that ScanReg has made in the past.
Good news: Microsoft fixed this flaw in Windows Me. The bad news is that the Me operating system has an equally troubling situation: The start-up menu no longer includes an option for booting to a command prompt. If Windows Me is already running and you choose Start, Shut Down, you won't see an option for booting to MS-DOS mode. Thank you, Mr. Gates. If you need to make repairs using ScanReg from the DOS prompt, you'll have to boot your computer using the start-up floppy disk you were prompted to make during installation. If you don't have one, choose Start, Settings, Control Panel and double-click Add/Remove Programs. Then click the Startup Disk tab and follow the instructions.
To work around the ScanReg glitch in Windows 98, you have to trick ScanReg into showing you the five backups that you would like to see. At the command prompt, switch to the folder containing your backups by typing cd c:\windows\sysbckup (your path may differ) and pressing Enter. Type dir rb*.cab and press Enter to see all the Registry backups and their dates. Using this information, decide which five backups you want ScanReg to show you, and rename the rest. For example, if you know rb004.cab is an outdated backup, type ren rb004.cab rb004.bak and press Enter. Repeat until only your chosen five backups have the.cab extension.
Now you can type scanreg/restore in either Windows version to view your backups in ScanReg. (This command line is a shortcut that bypasses the other screens and takes you directly to the backup list.) If you are in the throes of an actual emergency, you can use the arrow keys to select the backup you want, and press Enter to restore it. ScanReg will do the rest and prompt you to restart your computer when it's done.
On the other hand, you may not need to boot to a command prompt to restore a damaged Registry. In many cases, Windows will start even if the Registry is nearly kaput. So before you visit the DOS prompt, start Windows Explorer and open the Windows folder. You may need to click Show files (Win 98) or View the entire contents of this folder (Win Me) to see any files. Either rename your existing Registry files (System.dat and User.dat) or move them to another folder just in case you make a mistake that ends up doing more harm than good.
If you don't see these files, choose View, Folder Options (Win 98) or Tools, Folder Options (Win Me), click the View tab, select Show all files (Win 98) or Show hidden files and folders (Win Me), and click OK. Locate one of the backup Registry.cab files in the Sysbckup folder (within your Windows folder), and double-click it. As long as you haven't installed software that reassigns the.cab extension, the selected backup Registry.cab file should open in its own folder window.
Select System.dat and User.dat, right-click one, and choose Extract. Designate the Windows folder and click OK. (If you didn't previously move or rename the existing Registry files, or change their read-only attribute, nothing will happen because the Extract command will not overwrite read-only files.)
If you're using an application such as WinZip, double-clicking the.cab file will open that utility; use it to extract the System.dat and User.dat files and place them in the Windows folder, then restart your computer. If something goes wrong during the process, repeat one of the preceding methods using another backup from a different.cab file.
For more tips on coping with and repairing a damaged Registry, see the June 1999 Windows Tips.
Windows Toolbox: Protect Your Privacy With Folder Guard
I'm often asked if there's a way to password-protect individual folders in Windows. Using Windows alone, the answer is no; but if you're willing to shell out $50, WinAbility's Folder Guard will let you do just that, and a whole lot more. You can secure folders with passwords, make them read-only, or render them completely invisible to Explorer and other programs. You can protect files at the drive or folder level, or based on a file's extension. You can set up different permissions for individual users and decide who may access the Control Panel and other system tools. Utilities such as this won't stop determined hackers, but they will protect you from the casual prying of coworkers or family members. Folder Guard is available in our Downloads library as fguard.zip.
Scott Dunn is a contributing editor for PC World and a principal author of The PC Bible, 2nd Edition (Peachpit Press, 1995).

