This sheet summarises all the things I do to make my Win2k machine more useful to me. I've summarised it here partly for my own benefit. (I have to repeat the process on each new machine) and partly in the hope that it may be be of use to others.
Please tell me, firstname.lastname@example.org, if there are things you find useful that aren't mentioned here.
I have a Win2k Machine, but I've added possibly-inaccurate notes about Win95 too. In general, Win95/Win98 behave the same, and WinNT/Win2k behave the same.
- General setup and user interface
- Set environment variables
- Make your caps-lock key into a duplicate of Ctrl
- Make your Outlook Contacts take precendence over the global address list
- Install better fonts
- Stop booting with NumLock on
- Make the cmd shell have decent copy/paste
- Switch off the pesky MDM process
- Work around the pesky foo.ps problem
- Access your Windows machine remotely
- Make filename completion work in the cmd
- Info about your profile
- Change what's started at boot time
- Monitor power-saving and Exceed
- Make the printer staple by default
- Printing the first page (only) of a letter on printed letterhead
- Find out what a funny filename extension means.
- Make Adobe Acrobat start faster
- Show full menus in Outlook
- Recover a gigabyte of disk space
- Useful freeware
- Powertoys: quick launch, context menus, etc.
- SysInternals: file, disk, network, process utilities.
- Launchy: launch applications in a few keystrokes.
- Perform useful tasks
- Wake up your laptop's network connections
- Folder navigation
- Run the Inbox Repair Tool (Outlook users)
- Capture a screenshot
- Click in a URL without opening it
- Defragment your disk from the command line
- Restart the desktop after Explorer crash
- Notes about .reg registry files
- Print ASCII files
- Show folder sizes
- Read and write Mac floppy discs
- Papers and presentations
- Export Postscript from a Word, Excel, or Powerpoint document
- Include LaTeX equations in Powerpoint slides
- Draw a Powerpoint/Visio picture and include it in a LaTeX document
- Convert between Word and LaTeX.
- Include typeset material from Postscript into a Powerpoint slide.
- Include mathematical symbols in Word documents.
- Install and configure useful packages
- Links to other people's cheat sheets
- Philoman has a huge collection.
Acknowledgements: Many thanks to Sigbjorn Finne and Luca Cardelli, from whom much of the enclosed advice comes.
General setup and user interface
Your environment variablesMuch of the Unix-y stuff below involves you setting your environment variables. For example, on WinNT/Win2k, to edit your PATH variable, do the following:
- Press Start/Settings/Control Panels
- Double-click System
- Press Advanced
- Press Environment Variables
- Under System Variables, select PATH
- Press Edit
- Add ";C:/whatever/" to the end of the string (for example)
- Press OK
Some environment variables are "user variables" and some are "system variables". (I'm not sure of the difference but both are changed though the same dialogue.)
In addition, when running a Cygwin (see below) shell you can set environment variables in your .bashrc file. But it is better to set your environment variables from the control panel (they get inherited by bash) because then they are visible to applications that aren't started by bash. For example, when you're invoking CVS (and ssh) via Emacs keybindings; it invokes cvs.exe without going via bash. On a Win9x machine you need to edit autoexec.bat using Windows/system/Sysedit. You need to reboot to make the new settings take effect.
Make Caps-lock behave like CtrlWhen I'm using emacs I need to use the Ctrl key a lot. It's very inconveniently placed on the Windows keyboard. A much better plan is to make the Caps-lock key (which is much better placed) into a duplicate of the Ctrl key. You lose Caps-lock, but who cares?
I know of two ways to do this (below).
Alternatively Luca recommends the Happy Hacking keyboard. No caps-lock at all.
Ctrl2CapHere is a utility that does the job:
http://www.sysinternals.com/ntw2k/source/ctrl2cap.shtmlI've been using it for some years. NOTE: the distributed version of Ctrl2Cap (2.0) works fine with Windows XP. About a year ago I had a lot of trouble with version 2.0 on my then-Windows-2000 machine. I fiddled about for ages, and contacted the author. Nothing worked. Fortunately, I had a previous version still around, and that does work. Well, it did for me. Here it is. Use only if desperate.
Altering the key mappingErling Alf Ellingsen told me that an easier way to achieve the same effect is by altering the key mapping in the Windows Registry. Here's caps.reg a little registry file that makes the alteration. You can install it just by double-clicking on caps.reg (after unzipping it). (See notes about .reg files.) Then restart your machine to make the change take effect.
Here's what caps.reg contains:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=#hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00Erling writes: "Breaking it down:
00 00 00 00 ("version", should be 0) 00 00 00 00 ("flags", should be 0) 02 00 00 00 (number of key maps) 1d 00 3a 00 (map scan code 1D to scan code 3A) 00 00 00 00 (blank key map)If my memory serves me, 0x1D is the left ctrl key, and 0x3A is Caps Lock."
I have tested this solution and it seems to work. Strange though; if it's so easy, why do SysInternals have a special utility?
Make your Contacts take precendence over the global address list[This one is relevant for Outlook only, and even then I think it's specific to Outlook XP.]
When you type someone's name in the "To" field of a message, Outlook tries to figure out who you mean. It can look in more than one address book, and it's essential that it looks in your own Contacts first, else it'll auto-complete to some random person in the global address list (which in my company is pretty big). It won't even flag a "not-sure"; it just auto-completes to the wrong person.
It's easy to make it look in your Contacts list first, once you know how, but it's devilish hard to find out how. Here's what to do.
- Select "Tools/Address Book...".
- In the new window, select "Tools/Options...".
- In the lower pane select "Contacts", and use the up-arrow button beside the pane to move "Contacts" up to the top.
Install better fontsLuca Cardelli's home page has a couple of nice fonts available under "Mac/PC resources". In particular, his LICS font has a menagerie of useful mathematical symbols that aren't available in any standard font.
To install a new font, just drag it into C:/WINNT/Fonts. You don't even need to reboot.
Stop booting with NumLock onIt has happened to me, both at home and at work, that my computer would boot up with NumLock on. (This makes it puzzling when you try to type the password to log on...). This setting somehow gets embedded in the guts of the boot process, for unknown reasons.
To fix it, add the line (found in the Microsoft Knowledge Base):
NUMLOCK=#OFFat the end of your C:\config.sys. Num lock will still turn on at the beginning of booting, but will turn off again before the end of booting. (This works for Win98; I don't know if it works for Win2k.)
Make the cmd shell have decent copy/pasteThe default setup for copy and paste in the cmd shell is a huge pain. (You have to right-click, select Mark, and then select the bit you want to copy.) You can fix this:
- Right click in the title bar of the cmd window.
- Select Properties.
- Check QuickEdit, and click OK.
- You're then asked whether you want the change to apply just to this instance, or to all instances; choose the latter.
There are various other things you can change in the Properties pane for a cmd window, such as the background colour and window size. Thanks to Reenen Kroukamp for telling me about this.
Switch off the pesky MDM processOn my laptop, a background process MDM.exe used to appear, which seemed to cause hundreds of page faults a second even when I was doing absolutely nothing. Since I use my machine a lot for compiling, I reckoned I could do without it.
MDM is the Machine Debug Manager, and it is installed with Internet Explorer. Like me, you probably don't need it. Here is how to tun it off/disable it. Go to the Control Panels and click Internet Options. Click on the Advanced tab and check the box 'diable script debugging'. This should stop it appearing.
Work around the pesky foo.ps problemUsing Internet Explorer, I often follow a link to someone's paper, with a filename like foo.ps.gz. In response to the popup box, I click on "Open this file from its current location"; zip files can't hurt you (I belive). IE downloads the zip file, and WinZip starts up automatically, which is all very wonderful. But alas, the file it displays is called foo.ps, rather than foo.ps, so I can't double-click on it in the WinZip window. I have no idea where the pesky "" comes from.
The slow solution is to extract the file, rename it, and then double-click on it. Less slow is to right-click on it in the WinZip window, select "View...", and then select gsview as your viewer.
But the best (albeit hackish) solution is to tell Windows that ".ps" is a suffix meaning "here's a Postscript file; run gsview". It's easily done. In an file browser window select "Tools/Folder Options" and click the "File Types" tab. Click "New". In the new dialogue window type "ps" as the new file extension. In the same window, click "Advanced", and select "Postscript" from the huge list you are offered.
Now do the same for "ps", "ps". (I've never needed more.)
Access your Windows machine remotelyWindows now comes with Remote Desktop built-in, which lets you display your windows desktop on another (Windows) machine: look in "Start/All Program/Accessories/Communications/Remote Desktop Connection". However, you can only connect to a remote machine if the remote machine is willing to accept such connections. To make it willing:
- In the "System" Control Panel (also accessible via Right-click/Properties on "My Computer"), choose the Remote tab, and check "Allow users to connect remotely to this computer".
- In the "Network connections" Control Panel (also accessible via Right-click/Properties on "My network places"), select Right-click/Properteies on the local-area connection. Pick the Advanced tab, and click the "Settings.." button for Windows Firewall. Pick the Exceptions tab, and ensure that the "Remote Desktop" checkbox is checked.
Make filename completion work in the cmd shell[If you use the TweakUI thing above, you don't need this.] When you are typing commands to the standard cmd shell, filename completion doesn't work by default. Here's how to switch it on (thanks to Alex Buckley for this).
- Run regedit.exe (Start/Run..; then type regedit).
- Search for "completionchar" (it's under HKEY_CURRENT_USER\Software\Microsoft\Command Processor; ignore the one that's under HKEY_USERS).
- Change its value from 0 to 9 (ASCII code for Tab). You can do this by right-click/Modify on "completionchar".
This doesn't work in Win95/8 because they only have the old command.com available as a command processor.
Info about your profileYour "profile" is stored in WINNT/Profiles/<your-user-name>. If you have a roaming profile, like I do, some of this stuff gets copied to the main server when you log out, and sucked down when you log in, so it's desirable that it's not too big. In particular:
- The Desktop folder is copied. If you have big files (not shortcuts) on your desktop, they'll get copied up and down.
- The Favorites folder is copied.
- The Local Settings folder is not copied.
This is a good thing,
because it's big:
- Application data: machine specific application data.
- History: Internet Explorer history.
- Temp: temporary files.
- Temporary Internet Files: Internet Explorer offline cache.
You can change whether you have a roaming or local profile thus:
My Computer/Properties/Advanced/User Profiles Settings/Change Type/Local.
Changing this setting affects only the computer you change it on. A single account can have a roaming profile on one computer and a local profile on another.
Change what's started at boot timeWindows has many marvellous ways of changing what programs are run at startup time; e.g. what programs end up in your "system tray". I could never work out how to get rid of them, until Sigbjorn told me:
- You can selectively turn items on/off via the msconfig utility under Win98. Do Start->Run, type "msconfig" and then look under the Startup tab of the UI that pops up.
Monitor power-saving and ExceedFor a long time I was frustrated because I could not persuade my desktop PC to switch off the monitor as it is supposed to. (Doing so saves a lot of power overnight, and all screens come with "Energy Star" stuff designed just for this purpose. It also extends the life of the cathode ray tube by turning off its electron-emitting heater filament.)
The problem turned out to be Exceed (at least in V7.0). Exceed is an X server that lets you display X windows on your machine. In its default configuration, Exceed prevents the screen switching off. To fix this:
- Get the Exceed configuration window up. Either use Start/Programs/Hummingbird/Exceed/Xconfig, or right-click the Exceed icon in the task bar and select Tools/Configuration...
- Double-click "power management".
- Uncheck the box that says "Prevent display from being shut down". You can ignore the promising looking boxes about "Refuse sleep" and "User interaction"; they didn't seem to affect anything.
Make the printer staple by defaultI am fortunate enough to use a printer with a stapler, but it took me ages to discover how to make it staple by default. The same trick works for various other printer settings. What is particularly exiciting is that you have to make the same change in two places in the printer properties. If you only do it in one, it works for a few weeks, and then stops working. Don't ask me why, but it does.
Here's how to change the default behaviour:
- Open "Start/Printers and Faxes"
- Right-click the printer and select "Properties".
- Click the "General" tab
- Click the "Printing preferences..." buttton
- Click the "Layout" tab
- Click the "Advanced..." button
- Expand "Document options/Printer features"
- Click on the underlined "Staple off" item and change it to "Staple on".
- Click OK twice, so you are back to the main Properties window for the printer.
- Click the "Advanced" tab.
- Click th "Printing defaults..." button.
- Click the "Layout" tab, the "Advanced..." button, and change the settings just as you did before.
- Take a moment to wonder why you had to do it all twice. Conclude that you have no idea.
You can also do this on a case-by-case basis. When you are about to print your document:
- Select "File/Print.."
- Click "Properties" in the Printer panel at the top
- Click the "Paper/Quality" tab
- Click "Advanced..."
- Now you are back to the dialogue described above....
Printing the first page (only) of a letter on printed letterheadYour printer may have multiple paper trays, one loaded with headed paper. When printing a letter, you only want the first page to come from this tray. Here's how to achieve this glorious outcome.
Select "File/ Print..", choose your printer etc, then click the "Properties" button (top RH corner). Click "Advanced...". Find the bit that says "First page different", and open it up (click the "+" sign). Change the setting to "Enabled" and pick the media type. The latter step selects which paper try the printer will use, but unhelpfully in my set-up the "media type" setttings are things like "pre-printed" and "labels" rather than "Tray 1" , "Tray 2", etc. Quite how it knows which tray has pre-printed sheets is beyond me. I use trial and error to find the mapping.
Find out what a funny filename extension meansI occasionally come across a file with an extension (suffix) I don't recognise. There are quite a few web sites with a comprehensive list of what file extensions mean, but I didn't find them easy to find. Here are the ones I know about.
Make Adobe Acrobat start faster[Note: I gather that this process does not work for version AcroRead 7.0. And in any case version 7.0 seems to start up much faster for me, so the fiddling isn't necessary.] Adobe Acrobat is the standard reader for PDF, but it starts up really slowly because it loads a bazillion plug-ins. You can trim the plug-ins, and hence greatly speed up start up as follows:
- Go the directory Program Files\Adobe\Acrobat 6.0\Reader.
- Make a new directory skipped_plug_ins. (Doesn't matter what you call it.)
- Move all the files in directory plug_ins into your new directory,
Show full menus in OutlookOutlook (2003 and later) shows you only the most recently used menu items; it shows the others after a short delay. If you don't like this, use Tools/Customize and check "Always show full menus".
Recover a gigabyte of disk spaceIf you are like me your hard disk is pretty full. A simple change in settings can save you almost 10% of your hard drive.
By default, Windows XP reserves 12% of the hard drive for something called restore points. These can be used to restore the system to a previous situation if you mess up the system with some install or other changes. This 12% can get used pretty fast when you install a lot of software. And 12% of your disk is a lot: 28GB drive * 12% # 3.36GB.
You can reserve less space, and so free up a lot. The downside is that you will not be able to restore the system to 10 restore points ago. I for one never used this options anyhow, so restoring just a few points back is plenty for me.
- Right-click "My computer" and select "Properties".
- Choose the "system restore" tab.
- Change the settings to 3-4% and click ok.
PowertoysMicrosoft Powertoys is a bunch of small but useful tools. Ones I've used or had recommended include:
- TweakUI: a control panel that lets you alter aspects of the Windows user interface.
The ones I like are:
- File-name completion in the cmd shell.
- Stopping popup windows stealing focus, so that your input goes to the new window.
- CmdHere: adds an item to the context menu that pops up when you right-click in a folder window, which opens a cmd window with the current directory being that folder.
- DeskMan: a four-window virtual desktop manager
SysInternalsSysInternals is a collection of utilities (provided now by Microsoft) that do many good things. The one I have used is:
- Process Explorer: a bit like the Task Manager window, but it displays the tree of processes. If you kick off make and it spawns lots of other thing, it's handy to be able to kill the root process easily.