Nlite and Windows XP

Well, I had my first major experience with Nlite and Windows XP tonight. I installed a new 160 GB Seagate hard drive into Mom’s Compaq Evo 510 and I used Nlite to slipstream SP2 into Windows XP, since SP2 is necessary to properly use a drive that big.

The resulting image was far too big to fit on a CD, so I started pulling stuff out.Mainly I pulled out stuff like Outlook Express, MSN Explorer, and Media Player. I thought about removing Internet Explorer, but since Mom is going to use MS Office, I thought twice about that. Office uses IE for some things. If I’d been building the system for me, I’d pull that too.

I also removed most of the international support. I saw no need for anything other than US English and maybe Spanish, so I pulled the rest.

Installation went fast. Really fast. I laid down Windows XP, Office 2000, and Firefox in less than an hour. I used the Nlite CD to install the OS, and I installed Office and Firefox from a USB flash drive. All I need now is antivirus software and the system would be usable.

It boots lightning fast–we’re talking 20 seconds from POST to a desktop with no hourglass. Installing antivirus software will slow that down, but it’s impressive. Part of that is due to the new hard drive, but it’s a Seagate 7200.10. It’s newer and faster than the five-year-old Western Digital drive the system came with, but the 7200.10 isn’t exactly new technology anymore.

Memory usage isn’t bad either–100 megs at boot. That’ll double or triple once I install antivirus software, but at least I’m starting lower than usual.

I didn’t check disk usage, but I’m sure it’s much lower than the typical 1.5 GB.

I’m a believer. The results make me wonder just how old and slow of a computer I could get away with XP on.

Updating Windows without a network connection

Problem: I have to get three Windows servers patched up to date tomorrow. I found this out about 3 this afternoon.

Second problem: No network connection to the outside world, under any circumstances.

Third problem: Any rewritable media used on said servers must be destroyed after use.

Impossible? Believe it or not, no.Normally we keep a copy of Hfnetchk Pro in this environment for pushing out patches (copied from an Hfnetchk Pro server that does have a connection to the outside world), but someone saw fit to blow that server away. Ahem. Someone can expect a thank-you letter from me. And perhaps a thank-you present from my dog.

As for why servers with no connection to the outside world need patches to protect them from the outside world, well, I don’t make the rules.

So the answer in this case is to get my grubby mitts on ctupdate, a tool written by the wonderful German IT magazine c’t (their few English-translated articles are so brilliant, I wonder sometimes if I should learn German just so I can read the magazine).

Ctupdate will go download your updates, make an ISO image for you to burn to CD or DVD, and the result includes a nice menu so brain-dead easy that even a CIO could use it. (Oh, did I say that out loud?)

The catch? At present, a full collection of Windows XP or 2003 updates is nearly 800 MB in size, so make sure you have a fast network connection and either a DVD burner or a big USB disk if you plan to use it.

With a ctupdate-created DVD in hand, I can walk up to those isolated servers, pop in the disc, click a couple of buttons, have a cup or two of coffee, and then move on to the next one. Or better yet, copy the DVD to a network share, run the executable, click those buttons, have some coffee, and get on with the day. Problem solved.

This works for some slightly less convoluted situations too. If you expect to be asked to fix Windows PCs for a relative or twelve while you’re on Christmas vacation, prepare by downloading ctupdate, downloading all the updates, and either burning them to DVD or copying them over to a USB device. It works with Windows 2000, XP, and 2003 updates.

Installing Windows from a USB device

I’ve seen this done before, but this is currently the only guide I can find to Installing Windows XP from a USB drive.

If your computer has USB 2.0 ports and can boot off USB (true of most recent PCs), this is not only convenient–it should also be very fast.The computer may or may not boot quickly, but once it’s up and running, Windows should theoretically install in a few minutes. And if you slipstream your service packs, you can save that installation time too.

If you have the 32-bit version of Ghost, you can deploy images with this method too.

I installed MS Office off a USB stick last week, and it installed in about five minutes.

While your CD-ROM drive is connected to a faster bus, the USB stick has much lower seek times, and when you’re transferring large numbers of small files, such as during an installation, seek time matters more.

If you build a lot of systems, you need this guide. About a 2-gig USB flash drive ought to hold everything you need.

Fixing choppy audio in Windows XP SP2

So I’m sitting at this 2 GHz PC with 2 GB of RAM and a reasonably fast video card, and the audio in Railroad Tycoon 3 skips and sounds a little bit distorted.

It’s maddening when the game played fine on 400 MHz systems. I did some digging, and bad audio seems to be a common problem in XP SP2, but solutions are rare.I’ll cut to the chase: A little-known hotfix, KB920872, fixed the problem for me. This isn’t the specific problem this hotfix addresses, but since it does affect the audio subsystem, I figured it couldn’t hurt.

It worked for me when all of the conventional fixes didn’t, and I haven’t seen this hotfix mentioned anywhere. So if your new computer can’t play MP3s or stream online video or audio as well as a Pentium-166 running Windows 98, try the hotfix.

The usual advice is to update or reinstall your sound drivers, and if possible, to use drivers from the manufacturer of the computer or of the sound board, rather than drivers that Microsoft provides.

In my case, I already had the newest manufacturer-supplied drivers, so that didn’t help. Utilizing the newest drivers from the manufacturer is usually a very good idea anyway, of course.

Another piece of advice was to install Windows and all the service packs and hotfixes before installing drivers and software. That’s a good practice–and I like to use something like nlite to slipstream all of those updates so the system doesn’t accumulate too much cruft. But I didn’t want to rebuild this system, partly because the vendor didn’t provide an XP CD or installation files on the hard drive, only a certificate of authenticity. (Doesn’t it stink when you have to pirate software you already legally own?) So that wasn’t a very practical option in this case.

Another suggestion I’ve seen is to go into the control panel and either increase or decrease the sound acceleration. I don’t like this option; you always want to use whatever hardware acceleration you can. You paid extra for it, after all.

Using discrete hardware as opposed to built-in sound doesn’t make a difference. I was using onboard, but I found people using Creative’s highest-end cards experiencing the same problem, which must have been maddening.

Finally, I found some people saying they had the problem go away when they upgraded to Vista. I don’t like that option either, because I found just as many people saying their audio skips in Vista but worked fine under XP SP2.

And no, I don’t know how to fix skipping audio in Vista. I haven’t seen it yet and have no plans to mess with it. Maybe in five years. Maybe.

So now I just have to figure out how to get XP SP2 to get along with my Firewire card. It seems to be a common problem.

Robocopy categorized as social/dating?

So I got fed up with my network connections dropping 80% of the way through copying 25-megabyte files halfway across the world. I’ve been using Robocopy, but without any command line options, it just starts over again.

I did a little digging and found the /z switch, which is supposed to make it pick up where it left off. It introduces a little overhead, but I can live with that. It’s better than copying the files 1 1/2 times.

Finding out about it was the amusing part.After stumbling upon the /z switch, I punched that into Google to see what other people were saying about it. That’s where I learned about the increased overhead. Fine. But one of the links I clicked on was blocked by Smartfilter, which is the application my employer uses to keep us from spending all day watching Youtube.

Surprising? No. Smartfilter blocks lots of useful stuff that makes it a lot harder to do my job. But the category it put that page into was pretty amusing: Dating/Social.

I can just imagine that date now. Two people meet after work in a dimly-lit restaurant that will be out of business in 18 months. Instead of talking about music, or movies, the neighborhood, or the other things my wife and I talked about on our first date, they talk about Robocopy.

"Where have you been all my life? All I’ve ever looked for was a nice girl who knows what the /z switch in Robocopy does! I’ve never met a girl who knew what Robocopy was!"

Actually I might be able to think of one or two relationships that probably did go down something like that, now that I’ve mentioned it. I think that should scare me.

Meet Robocopy

If you remember the days of DOS, you know the difference between COPY and XCOPY. For those times when XCOPY won’t cut it, there’s ROBOCOPY, part of the Windows resource kit.If you just need to sync up two directories, Robocopy does it happily. Type ROBOCOPY source destination, and it will happily copy new and changed files over, while leaving identical files alone. This can save lots of time.

ROBOCOPY.DOC will give you lots of tips and ideas for using the program.

I have to do a lot of work over a WAN, and sometimes the network conditions are less than optimal, to put it politely. By that I mean sometimes I get nostalgic for the 9600 bps modem I had in high school, because it was faster and more reliable. Robocopy will detect errors and retry, which is a huge help in these conditions.

One thing I do frequently is copy single large files. The documentation file isn’t very clear on how you do this, and the syntax is tricky. Here’s how to copy a single file between two servers or directories:

ROBOCOPY source destination file(s)

Here’s a line I use a lot, to shoot out new virus definitions to my management servers:

ROBOCOPY . "\\servername\c$\program files\symantec\symantec antivirus" *.xdb

This is just a glorified copy command, but if any part of it fails, it will retry until it works.

In the past I’ve also used Robocopy to move file shares when upgrading file servers. I’ll create the share on the new server, copy everything over, and then, in off hours the night before the cutover date, use Robocopy to sync them up. Here’s an example:

robocopy \\oldserver\accounting \\newserver\accounting /MIR

Of course, since Windows has had DFS for 8 years now, you’re using DFS for everything now, right? Of course not. So for the times when you have to replace a fileserver and migrating to DFS isn’t an option for whatever reason, Robocopy is your fastest and easiest option for a cutover.

How to use your computer skills to earn some extra money

If you’re in need of some extra money and you’re computer-savvy, the scumbags of the earth have a deal for you. You see, they load unwitting computer owners’ PCs up with loads of junk, and they can render a new, state of the art computer useless very quickly. That’s an opportunity for you to use your computer skills to earn some extra money.

If you can learn to clean up the mess, you can probably have as much after-hours work as you want.Assuming you’re pretty good at fixing your own computer (don’t go into business fixing computer problems if your computer runs like garbage), cleaning it up is pretty easy.

Keep copies of Ad-Aware, Spybot Search & Destory, Bazooka, and Avert Stinger handy on a CD or USB flash drive. Install the programs and then run them. I run Bazooka first and last because it’s fast and gives a good overview of the health of the system.

Run all of the antispyware programs and let them do their thing. Then run Stinger in case they aren’t keeping up with their virus definitions. Once you clean the system up, update the virus defs (install antivirus software if they don’t have any–AVG strikes a good balance between effectiveness and ease of use, and it’s free) and defragment the hard drive.

Most IT people I know charge about $50 for the service. Have the customer bring the PC to you since a good spyware scan takes several hours. Let Spybot scan overnight, then clean it, then led Ad-Aware run while you’re at work and let it clean.

Keep an extra monitor, keyboard and mouse around so you can just plug in your customer’s CPU and go.

If the computer is in such bad shape you don’t get a start menu, boot it in safe mode and clean from safe mode.

And there you go. An easy side business. Hopefully you’ll have a booming business so fewer people will call me.

Optimizing a brand-new PC

Dell offering PCs free of bloatware and crapware reminds me of the ultimate optimization tip, the thing you should do on Day 1 immediately after unboxing your PC.

Reformat the hard drive and start over.Most PCs get shipped with lots of garbage you don’t want or need. It used to primarily be signups for online services, but there are plenty of applications you’ll never use, trial applications that aren’t fully functional unless you pay for them, and who knows what else.

The reason this stuff gets bundled generally comes down to money. The manufactuer loads this stuff, and the company who made it pays a small fee. The software company is hoping you’ll sign up; the computer maker uses the money to subsidize the cost of the hardware (computer hardware is a very low-margin business).

Software that you install but don’t use slows your computer down, because it chews up disk space, bloats the registry, and it may keep some components loaded at all times. Get rid of that garbage, and the computer speeds up.

When I started working in desktop support way back in 1995, this was standard procedure. We squeezed far more life out of computers than anyone could reasonably expect us to do. But we had to do it–we had virtually no budget to work with.

So, assuming your PC comes with a real Windows CD (not just a system restore CD that reloads the factory image, junk and all), insert that CD when you power on, format the hard drive and install fresh. Better yet, use another computer to set up Nlite so you can install Windows with exactly the components you want. That way, if you don’t want or need, say, Media Player, you don’t have to have it. (Personally, I like to watch videos and listen to MP3s on my servers, especially seeing as they don’t have sound cards.)

If you haven’t ordered your new PC yet, be sure to ask when you buy whether it comes with a system restore CD or a real Windows CD.

If a new PC doesn’t come with a real, bootable Windows CD and I don’t have any other means to get one, I wouldn’t buy the PC. Period. That’s how important this is.

Improve your Internet connection speed by adjusting your MTU

Way back when the majority of people used 56K modems to access the Internet and I was writing my book on system performance, a favorite computer enthusiast’s tweak was the MTU.

Don’t make the mistake I made though, and assume MTU adjustments are just for people with modems. They aren’t. I just adjusted the MTU on two of my Windows boxes and the speed improvement was dramatic.
I’ve had to adjust the MTU on my Web server to deal with a weird connectivity issue some people were having, but it never occurred to me that my workstations would benefit from a similar adjustment.

Figuring out the optimal MTU and then digging out the place to make the change can be a difficult process. It’s much faster and easier to use a utility that does the job for you. Visit TinyApps, one of my all-time favorite web sites, and scroll down to “Other Network Tools.” There you’ll find TCP Optimizer. It’s a 400K download so it’ll go pretty fast. You’ll be able to download it and run it much faster than you’d be able to read about the process.

I like this tool because it’s small and you can just download and run it, without installing it or anything. When you’re done with it, you can keep it in case you think you might ever need it again, or you can just delete it and not have any leftover mung clogging up your PC.

The default settings for Windows assume an Ethernet connection, but they don’t take any overhead into account. If you have DSL and your ISP uses PPPoE authentication (which most do), that takes overhead. If you’re using a router to firewall your network and share your cable or DSL connection between multiple PCs (which you should do), that takes overhead.

That’s what makes a tool like this nice. It eliminates the trial and error. You run it, make the changes it says, and then you have a faster Internet connection. And it’s one more thing you can do when you think you need a faster computer. In this case, having the faster computer probably wouldn’t have made much difference at all.

Optimizing Firefox

Firefox is a better browser than Internet Explorer by a long shot, but at times it’s made me wonder if it’s strayed from its original mission of being a lean, quick, simple browser based on the Mozilla engine.

I’ve seen several “Optimizing Firefox” guides and most of them talk very little about performance, and the ones I did find were not only disappointing, they also appear to be widely copied verbatim without attribution. So here’s what I do to shaq-fu Firefox into shape.Try out Firetune. Firetune is a wizard-like program that configures most of the common Firefox tweaks based on criteria you select. In my case, since I have a P3-700 with 192 megs of RAM, I selected Slow computer/Fast connection on the Performance tab, and Optimize Firefox memory usage on the tab labeled Other useful settings. For me, the payoff was immediate.

Install PDF Download. If you view a PDF file online, Firefox keeps Acrobat in memory essentially forever, where it does nothing but chew up precious memory until the next time you view a PDF, which might be in a minute, or it might be next month. Take control over this behavior by installing PDF Download.

By default, after installing PDF Download, you’ll get a dialog box asking what you want to do when confronted with a PDF file. If you click the View PDF button, it loads it in your OS default PDF viewer. This behavior is less seamless than viewing the PDF directly in your browser, but it’s much better for performance because after you close the file, the viewer unloads from memory. For even better performance, forget about Adobe’s Acrobat Reader and install Foxit Reader, which is much smaller and faster. By default, when you install Foxit Reader, it will make itself your OS default PDF viewer. Trust me, this is what you’ll want.

On my 700 MHz P3 running Windows 2000, PDF documents display in one second with PDF Download and Foxit Reader installed. That’s faster than Acrobat ever was, even if it was already in memory.

I like the combination so much, I went to Tools, PDF Download Options, and set the default action to Open PDF, rather than displaying the dialog box. Now I no longer dread downloading PDFs from the Web.

Optimize memory usage a bit more. Type about:config into a browser window and scroll down to browser.sessionhistory.max_total_viewers. The default value is -1, which will determine the number of pages in your browser history to cache based on the amount of memory you have. I set it to 1, since I do tend to use my browser’s back button a lot. If you almost never find yourself clicking the back button, or you have a very low-memory machine, set this to 0. Each page it stores takes up about 4 megs of RAM.

Clear your downloads. Hit ctrl-j to bring up the download manager and clear it out. Too many entries slows Firefox down, partly because it increases memory usage.

Keep your version current. Often newer versions of software are slower and fatter than the old versions, but newer versions of Firefox are often faster than older versions because memory leaks and performance problems tend to get fixed in newer versions. I don’t recommend running beta or preview release versions, and I’m not all that crazy about .0 versions either (when Firefox 3.0 is released, I’ll wait until version 3.0.0.1 comes out). I just upgraded an old computer that had been running a very early Firefox 1.0 to 2.0.0.4, and the difference is incredible.

For what it’s worth, version 2.0.0.4 (the current version) running with these changes feels very zippy on a P3-700 with 192 megs of RAM.