Simplify Disk Maintenance With Custom Shortcuts
If you regularly use Microsoft's ScanDisk and Disk Defragmenter utilities, you are probably tired of futzing with dialog box options each time you use the tools. You can avoid this trouble by adding a few command-line parameters and switches to the appropriate shortcuts. Then, the next time you want to check a disk for errors or defragment a drive, just choose the tool from the menu and the rest is automatic. You can also create multiple shortcuts with different command-line options for different purposes--for example, one that prompts you before fixing errors and another that doesn't.
To make ScanDisk and Disk Defragmenter more automatic, right-click the Start button and choose Open or Explore. Locate and select the ScanDisk or Disk Defragmenter shortcut (by default they reside in Start Menu\Programs\Accessories\System Tools). If you want to make a copy of the shortcut, simply click and hold the right mouse button to drag the icon to the location of your choice; then select either Copy Here or Create Shortcut(s) Here. Next, press Alt- Enter to open the icon's Properties sheet. Click the Shortcut tab and then click at the end of the command line in the Target box.
For a ScanDisk shortcut, type a space and then the letter of a drive you want scanned, followed by a colon, as in c:. Repeat for any other drives you want to check. To scan all local (nonnetworked and nonremovable) hard drives, skip the drive-letter parameters and instead type the switch /a (don't forget that every option you add to the command line should be preceded by a space). If you want to make ScanDisk start and stop without prompting you beforehand, enter the /n switch in the command line.
Even if you use the /n switch, ScanDisk may stop to report errors. If you don't want such information, start ScanDisk and check Automatically fix errors. You'll have to click Start and run ScanDisk at least once to make this setting stick. Finally, if you want ScanDisk to run in Preview mode--that is, to find errors but not to fix them--use the /p switch. Be aware, however, that Preview mode can be misleading because it gives the illusion that errors are corrected when in fact they are not. When you're finished, you might have a command line that looks similar to this: c:\windows\scandskw.exe c: d: /n (see FIGURE 1). This example would instruct the utility to check drives C: and D: and then automatically exit when finished.
For the Disk Defragmenter shortcut, you can type individual drive letters (include the colon) into the Target command line, the same as you do for ScanDisk; to defragment all nonnetworked hard drives, simply type the switch /all. If you want to defragment only to ensure that each file is stored contiguously on the disk, and not to consolidate free space, use /u. On the other hand, if you want free space consolidated without defragmenting files, type /q. If you want both file defragmenting and free-space consolidation, /f is the switch to enter (note that /u, /q, and /f are mutually exclusive; use only one). To make Disk Defragmenter start and end without asking for settings or displaying messages, use /noprompt. Finally, if you want to see only the small (default) Defragmenter window, type /concise; otherwise, type /detailed to see the disk map that symbolizes the defragging process. Type only one of these last two--or use neither to obtain the default (concise) view. Your resulting command line might read c:\windows\defrag.exe /all /f /noprompt if you want to defragment all local hard drives and consolidate free space on them, without user interaction, in the default view.
Manage Open Windows via Shortcuts or Keyboard
It's great that Windows lets us open several application and folder windows simultaneously, but it can be tough to manage all the windows competing for screen space. Fortunately, Windows provides some relief: Right-click the taskbar and choose an option to tile windows vertically or horizontally, or to cascade them (which arranges all nonminimized windows in an overlapping stack). Don't like the result? Right-click the taskbar again, and choose Undo Tile or Undo Cascade.
You may find it faster to tile or cascade windows from your keyboard, or to give each of these commands its own Quick Launch or other toolbar icon. You can do so with a suitable one-line script.
Open Notepad or another text editor, and type the line (new ActiveXObject("Shell.Application")).CascadeWindows(). Choose File, Save As. Navigate to an appropriate directory and type a name like "Cascade.js"; include the quotation marks so Notepad won't tack on its default.txt file extension. Click Save. To test the script, open Explorer and locate the icon for the file you just saved. When you double-click it, the open windows on your desktop should cascade.
To create scripts that will tile your open windows horizontally or vertically, repeat the steps outlined above but replace CascadeWindows() with TileHorizontally() or TileVertically(). Save each of these variations as its own separate.js file.
If you want to have quick access to your scripts, use the right mouse button to drag the files from the Explorer window and drop them into an appropriate submenu of the Start menu, onto the Quick Launch toolbar, or onto another toolbar. When you release the mouse button, select Create Shortcut(s) Here. Henceforth, you now tile or cascade all nonminimized windows just by clicking your shortcuts.
Note that if your computer associates JavaScripts with Notepad or another text editor, it won't run the script. To fix that, after you've placed the shortcut into your menu or toolbar, right-click the shortcut and choose Properties. Make sure the Shortcut tab is in front, and click the beginning of the Target text box. Type wscript.exe and a space. Click OK.
If you want to tile or cascade windows with a keyboard shortcut, you must place the shortcut icon either on the desktop or in a menu within the Start menu hierarchy. (I put all such shortcuts in a menu called 'Keyboard Shortcuts' so I can easily find them and change them later.) Right-click the shortcut icon and choose Properties. Make sure the Shortcut tab is in front. Click in the 'Shortcut key' box and press your desired keys. Windows forces you to have at least two modifier keys (from among Ctrl, Shift, and Alt) unless you press a function key or a key on the numeric keypad. Be aware that the keystrokes you choose will no longer work in any Windows application. Click OK and you're done. If you later decide to eliminate the keyboard shortcut, simply come back to this dialog box, click in the 'Shortcut key' box, and press Backspace. Then click OK and restart Windows.
If you launch your scripts from the Quick Launch toolbar, you'll probably want to give them distinctive icons so you can recognize them quickly. If you don't have any appropriate icons, you can use a shareware icon editor to make your own. One (admittedly basic) freeware tool is Gary Hodder's Icon Editor 2.1.
After you create and save your icon files (or find an existing icon that suits you), right-click one of the shortcuts in the Quick Launch toolbar and choose Properties. With the Shortcut tab in front, click Change Icon. Click Browse, select your icon file, and then click Open. With the icon selected in the dialog box, click OK twice. Repeat these steps for each of your toolbar icons. To give each Quick Launch icon a meaningful tool tip, right-click it and choose Rename. Type the text you want to see when you hold your pointer over the button (see FIGURE 2). Click OK.
From now on, whenever your windows get unruly, press one of your shortcut keys or click one of your Quick Launch icons. If you change your mind about the result, you can undo the new window arrangement by pressing Ctrl-Z immediately afterward. Note that the undo keystroke will not work if the last active application uses Ctrl-Z for its own purposes; the alternative method is to right-click the taskbar and select Undo Cascade.
Make a Font Sampler Book
Choosing the best fonts for your document is an important way to convey the right message and get the eye-catching look you want. You can preview fonts either by applying them to text in your document or by double-clicking the font files in the Fonts folder to open a window with font information and sample text. If you find these approaches too time-consuming, however, maybe what you need is a printed collection of your fonts.
Fortunately, making a font sampler book is easy. To print samples of your Windows TrueType fonts, choose Start, Settings, Control Panel and double-click Fonts (in XP, use Start, Control Panel, select Switch to Classic View if you're in Category view, and open Fonts). Hold down Ctrl and click each font you want to include in your font sampler book. Right-click one of the selected items, and choose Print (see FIGURE 3). At this point, you'll have to click Print or OK and Done a bazillion times to confirm the print command and close the preview windows.
When you finish, put your font samples into a binder that you can leaf through the next time you're looking for the right font. As you add and remove fonts from your computer, be sure to add or remove their pages to keep your sampler up-to-date.
If you have PostScript fonts, add them to your sampler. Adobe Type Manager is required if you want to use, view, or print PostScript Type 1 fonts in Windows 9 x or Me, or Adobe's Multiple Master fonts in any Windows version. You can download ATM Light, which is the free version. (The Deluxe version can also print TrueType font samples.) After installing ATM, open it and click the Fonts tab. Choose the fonts you want in your sampler, right-click one of the highlighted items, select Print, Sample Sheets, and click OK in the print dialog box.
In Windows 2000 and XP, you don't need ATM to manage Type 1 fonts. You should see them in the Fonts Window along with your TrueType fonts. If you have some that aren't visible there, locate their.pfm files on your hard drive, select the files, and drag them to the Fonts window to install them.
Windows Toolbox: Keep Those Desktop Icons in Line
Do you have trouble keeping your desktop
icons arranged the way you want? This can be a problem if
you change your screen resolution regularly--or if your PC
has a screen saver that changes it automatically. IconSaver
can preserve the icons precisely the way you arrange them,
and it can store separate arrangements for each screen
resolution. You can also set IconSaver to automatically
restore icons to their positions anytime the screen
resolution changes. And finally, you can customize keyboard
shortcuts for saving and restoring icons, among other
options. IconSaver works with all versions of Windows from
95 on. After 30 days, you need to register, but don't
worry: It's only $5.
Check it
out.
Send Windows-related questions and tips to scott_dunn@pcworld.com. Windows Tips pays $50 for published items. Click here to see past Windows Tips columns. Scott Dunn is a contributing editor for PC World.
