This is mostly just a bunch of links and personal notes. Some of those programs are free, others are cheap shareware.
"If you don't know where you want to go, we will make sure you get there." — Microsoft slogan, as understood in Japanese.
First, let me preface this by saying that when getting a new system, I always reformat it and do a clean install. The reason is that I don't want most of the stuff that's installed by default by the vendors: you don't know what it's for or what it does, and most apps nowadays have that annoying 'call home' property. Before doing this, boot the machine and copy \windows\system and \windows\system32 to a CD or a network drive so when doing the clean install you can point the missing drivers there.
Twolinks on how to completely rebuild, repair, or refresh an existing XP installation without losing data, and without having to reinstall user software, reformat, or otherwise destructively alter the setup.
In very short, you can use the 'repair' option of the install CD, only on retail versions.
CD key change ?
Use sysprep, (found on the XP cd in tools/reskit/deploy.cab or just search the cd for deploy.cab), extract sysprep.exe and run sysprep.exe -reseal. When the machine reboots you can enter the CD key from your legit copy of XP. Everything stays the same.
Another way to do the same: Reboot in safe mode; delete WPA.* (WPA.DBL, WPA.BAK) in C:\windows\system32; Reboot into normal mode, you will be warned that you need to activate; Click to activate, select by phone, select change key (bottom of form); Enter new legit key; You are returned to activation screen, click Activate online.
The excellent Aida32 hardware display and diagnostics is sadly discontinued. But the author now works on Everest, of which there is an also discontinued free version basically identical to Aida. Too bad...
CoolTaskBar to sort out the taskbar mess in Windows 2000.
TweakUI, with a lot of very important options: classic search window, prevent focus stealing apps, more Alt-Tab icons, disable wasteful animations, no 'shortcut to', high number of folders to remember, remove low disk space warning, taskbar grouping, customize or disable autoplay, disable control panels and templates, address bar search customization, autologon (so you can both have a password and not need to type it in)... And since there's plenty of tricks there, here's another one: did you know that in windows detail view in explorer you can auto-fit the columns with [Ctrl][Shift][numpad +] ?
On the Power toys page, also download the invaluable [Send file name to clipboard] which I cannot work on Windows without. Also Alt-Tab Replacement which gives a screenshot of window Alt-Tabbing, useful when you have multiple unsaved docs open, etc... Command prompt here. Get the ClearType utility to make sure you disable cleartype (why would I want to buy a very sharp monitor just to make the fonts blury on purpose ?!?)
Get everything from SysInternals, a ton of wonderful stuff here, too much to mention, but will let you track every file access, every registry write, every debugging message. Tons of great command line tools too. For instance, ever wanted to delete a file only to get a "There has been a sharing violation. The source or destiantion file may be in use" message ? Or when you want to remove a USB drive and the system tells you it's 'busy' although you haven't used it in a while and Windows doesn't even know for sure if the file is in use or not. Get Process Explorer from SysInternals.com and type the file name or the drive letter ('F:\') in its [Find][Find Handle] menu. Close the handle with a right-click or kill the appropriate process if necessary.
Memstat XP, lets you monitor memory usage in tray, small and simple but not that useful with all the complex repossessing stuff happening in virtual mem.
NetMeter, lets you monitor network usage in the tray, small and simple but does not seem to work on all types of network interfaces. Online Eye Pro works better and has lots more options, it's based on WinPCap just like Ethereal (see below).
TrayMeter, lets you monitor cpu usage in the tray, small and simple.
7-zip, which replaces both WinZip and WinRar and others. While you are at it, disable two of the most annoying WinXP behaviors: searching inside zip files and displaying zip files as folders (type regsvr32 /u zipfldr.dll at a DOS prompt). If I wanted it in a folder, I wouldn't have zipped it in the first place, geee.
There's some choice of free antivirus: AVG Anti-Virus, FreeAv or Avast!. And there's also the less powerfull but tinier ClamWin based on the clamav Linux virus scanner (it can only run disk scans). More about free virus scanners here.
As a complement to an antivirus, use both those spyware purgers: Ad-Aware and Spybot.
An original project: Maxthon is a shell for Internet Explorer with plenty of good options: tabbed browsing, popup blocker... For those who don't want to use FireFox for some reason.
Xmanager, excellent X-windows manager (or use cygwin, see below).
Active Ports, lets you see which program is using which port.
Based on WinPCap, both WinDump and Ethereal are network sniffing tools. Find out what's really going on onto your network.
If you cannot script it with rsync or robocopy, Beyond Compare, the best tool for comparing directories or files, great for syncing backups.
The Windows Server 2003 Resource Kit Tools, also working on WinXP, are a great set of command line tools. Includes Robocopy for advanced copy and backups across UNC paths. A command truly worth learning (similar to Linux rsync).
ImageMagick tools, command line graphic tools part of cygwin (there's also a direct Windows port, but if you use the Cygwin one you can pipe commands and do more complex stuff). See this post if it's not running without any error message. And if you still get error message such as 'convert 1796 _cygtls::handle_exceptions: Error while dumping state', then use GraphicsMagick. Easy, just add 'gm' before your ImageMagick command: 'gm convert -verbose -profile $AdobeICC test3.jpg -profile $AdobeICC test4.jpg'
Paint Shop Pro, cheaper and often better than the classic Photoshop. Versions X/XI have partial (but insufficient) 16-bit and color management support.
Acrobat Reader, pdf files suck, but you cannot do without. Use PdfCreator if you need to make a PDF (but why would you, unless you are writing something destined to be printed and never shown on a computer screen ?)
VueScan by far the best scanning software and compatible with just about everything you can throw at it, Win/Linux/Mac... Excellent payware.
WinImage, create images from CDs, very easy, very clean.
Media Player Classic, the only way to watch movies (avi, DVD, Divx...) with a standard and clean interface. Also very powerful.
OpenOffice, a free Office replacement. Also much easier to use than Office 2007.
Other Windows tips
Running Windows as limited user...
...should be customary, like in every other OS. Instead of this many badly written Windows apps need to be run as admin. Nonetheless it's better to try to keep things sane and clean (less virus/trojan risk) by running as simple user. Here are a few tricks:
Run installers as Administrator. The "Run As..." menu item can be used to elevate priviliges for a single program. This appears in context [right-click] menus by default, unless you're in the Control Panel where you need to [Shift][right-click].
Windows Explorer can be started as a different user, if you set the option to run Explorer Windows in a separate thread in [Control Panel (Classic View)][Folder Options][View tab][Launch folder windows in a separate process]. This option needs to be turned on for the user you are changing to, not for the current user.
Registry permissions can be set using reged32.
How to restart Explorer.exe
In Task Manager (Ctrl+Shift+Esc), find process "Explorer.exe" and kill it. If it doesn't restart right away, go to [File][New Task] and run 'explorer'. Some task bar icons disappear when you do that, although the programs behind them are still running.
Go to [Start][Shutdown]. When the dialog appears, hold Ctrl+alt+shift and click Cancel. Explorer will cleanly unload all of its resources and shutdown. To start it back up, open Task Manager (Ctrl+shift+Esc) and go to [File][New Task] and run 'explorer'.
Linux or Windows ? The answer is Yes !
There are several sets of compiled Unix command line tools for Windows. One is available from Microsoft on the Win2003/XP Resource Kit (or Win2k resource kit) and others like GnuWin32 or unxutils are free. They are natively compile, so the good thing is that they are fast. Drawback is that they are very limited in what they can do and don't chain very well.
Cygwin is a windows DLL that gives a high quantity of Linux tools under Windows. I use it 100 times every day. Even contains X-Windows. Those guys should get the Nobel peace prize. See my notes below.
That's the best way to try linux totally risk free. Select a Live boot CD, download its ISO, burn it to a CD, leave it in the tray, reboot and you are using linux without touching your hard disk ! Shutdown, remove the disk again, reboot and you are back at home in Windows.
For instance I like the several variants of Knoppix. If you still think that Linux is a command line hard to install retro thing, Knoppix will be a jaw dropper. It's also great in case something went deeply wrong with you main PC. Note: trick for booting into a Live CD without quitting Windows: go into Hibernation mode, turn the computer back on with the Knoppix/Live CD inside, boot to Knoppix and play with it, reboot to come back to what you were doing in Windows.
Even more mind-shattering: With ClusterKnoppix or Quantian you turn your computer, your laptop, your parents' computers and whatever else you can hook up into a super Mosix cluster in 5 minutes flat. The only thing missing will be your girlfriend's Mac.
COlinux tools to get a Linux environment running at the same time than Windows. It's not an emulator but a driver that splits your computer in two, with two different OSes sharing resources at the same time. Pretty limited in its early stages but very interesting concept.
Cygwin tips and tricks
Cygwin installation notes
Do a default install. They run it again and add plenty more than the default setup. Almost every linux/posix/unix/whatever command is there. One of the few missing one is mkfifo and that's due to the OS. Keep the setup.exe file and run it regularly to update your configuration. Run /usr/sbin/makewhatis and updatedb --localpaths='/ /cygdrive/c' --prunepaths='/cygdrive/c/cygwin /cygdrive/c/RECYCLER' as the first thing after starting the first shell so you can have proper man pages and locate database.
What's currently installed?
Run cygcheck -s for various info.
A better shell
The CygWin shell is based on Windows cmd.exe shell and hence sucks big time. There are several solutions around that (setup sshd then login with putty, launch X and use xterm...) but they are complex and have heavy drawbacks. One of the simplest is to download and unzip PuttyCyg. Then make a link to the executable in your start menu by adding -cygterm - and launching it from the C:\cygwin\home\username directory. It gives you a much better shell. The only thing missing are tabs.
Make sure you get all the gnu compilers (gcc and similar) and their associated tools, this way you can compile additional programs.
is also an optional part that's pretty useful, if not as nice as other commercial X-window managers out there. You can get WindowMaker with the install and configure .xinitrc to start with startx. Or better, you can use the rootless manager. Start it with startxwin.bat or . startxwin.sh and launch X apps from there. Yes, it's confusing as there seems to be plenty of ways to start X-Windows: XWin, X, few of them working directly without tinkering...
wget (download manager), ssh, scp, the incredible rsync...
For instance if your company firewall won't let you check email on a remote pop server, just tunnel the transfer with ssh: ssh -vCL 110:mail.remoteserver.com:110 firstname.lastname@example.org and change the POP3 config in your local email reader to use localhost instead of mail.remoteserver.com. Obviously you need ssh access on the remote server, but that is usually the case if it's a Linux/Unix host.
Install the ImageMagick set of tools to script image manipulations (see above for bugs).
You can run shell scripts at defined times if you enable the cron subsystem. Read /cygdrive/c/cygwin/usr/share/doc/Cygwin/cron-4.1-5.README and also man 5 crontab. If you are new to it, it may not be obvious, but it's worth it. Update your cron file with crontab -l >/tmp/cron && nano -w /tmp/cron && crontab cron
You can run updatedb from a cron job with the following line 5 5 * * * nice updatedb --localpaths='/ /cygdrive/c /cygdrive/l/Large1 /cygdrive/m/Large2 /cygdrive/n/Large3'. Note that simply using updatedb should run by default on / but will not discover the mounted drives. Also you want to exclude hidden folders. You can then use locate with part of your filename. Note that many older versions of cygwin have a buggy updatedb unable to parse filenames with spaces.
Dealing with spaces in filenames: if you want to use locate in association with xargs, spaces will ruin the thing, for instance locate -i def.h | xargs grep -H keyword will fail in most cases. here's a very simple hack which took me a long time to find: locate -i def.h | tr "\n" "\0" | xargs -0 grep -H keyword.
A portable Cygwin ? Cygwin on USB key ?
Cygwin is an invaluable tool (and free too), but its installation is time consuming and even more so network consuming. What if you use various computers all the time, without administrative installation rights, for instance in Internet bars, friends houses or even the next cubicle ? I needed to use rsync to update my site from any location. Here's a way to do a minimal cygwin that runs directly off a USB key:
Make a MiniCygwin directory on your USB key. In it copy the following files which you'll find in C:\cygwin\bin: cygcrypt-0.dll, cygcrypto-0.9.7.dll, cygminires.dll, cygpopt-0.dll, cygwin1.dll, cygz.dll, rsync.exe and ssh.exe (note, the version numbers may change)
Then I just plug the USB key in, open a DOS window in that directory and rsync away (or change the path if operating from another directory). Just be careful that you are not in bash anymore so the syntax is a bastard mix of DOS and linux: rsync still uses forward slashes for instance. You may be able to copy other programs that you need (for instance awk, bash, cat, cp, cpp, find, gcc, gdb, grep, ld, ls, make, mv, rm, sed, sh, tar...), just verify the dll dependencies: if you get an error when you try to run them, add the DLL indicated in the error message.
Gallery2, PostGreSQL and Cygwin
See files /usr/share/doc/cygwin/cygserver.README, /usr/share/doc/Cygwin/postgresql-7.4.5.README and /usr/share/doc/postgresql-7.4.5/FAQ_MSWIN
If initdb fails with the message cp: cannot stat `/dev/null.exe': No such file or directory, inside initdb you need to replace the line cp /dev/null "$PGDATA"/postgresql.conf || exit_nicely with touch "$PGDATA"/postgresql.conf || exit_nicely
Do cygstart filename.txt will open the file in your editor of choice (Notetab Pro in my case)
You can do clipboard manipulation like this: getclip | ...commands... | putclip Those two commands are part of cygutils.
To start a shell script from a [Start][Whatever] icon, create a shortcut in your start menu (or duplicate the Cygwin one) and in its [Properties][Target], type bash --login -i YourScript.sh
ps -W to display Windows processes.
Unix commands in the task scheduler
For instance running daily c:\cygwin\bin\bash -c "updatedb --localpaths='/ /cygdrive/c' --prunepaths='/cygdrive/c/cygwin'" will update the locate database of files. When looking for a file, instead of using the slow Windows Search, just type locate -i filename and get instant results.
Or you can install crontab with some efforts
Directory separators \ and /
Use cygpath to convert between unix, windows and DOS style pathnames. Don't forget the quotes or the backslashes if you have spaces in the file names.
There should be a export PATH=$HOME/bin:$PATH in your .bash_profile, but what is the original Path set to ? To the value set in [Control Panel][System][Advanced][Environment Variable] which you can edit there to add c:\cygwin\bin so you can use cygwin also from a DOS window. Mine is set to C:\cygwin\bin;C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\VXIpnp\WINNT\BIN;C:\Program Files\Resource Pro Kit\;C:\Program Files\j2sdk1.4.1_01\bin
Drag folders from explorer
Some commands, like cd accept windows style pathnames, so you can drag and drop folders from Windows Explorer onto a bash shell to write the pathname on the command line. Otherwise you can use painful quote embeddings like command "$(cygpath "Pathname")"
Replace something with something else in all files below a directory (/etc in this example, very dangerous command like most perl one-liners)