I've often wanted to create a really lean and optimized installation of Windows XP to use with VMware, disabling everything that's useless for the use case.
I've used quite a few days with nLite and have a really lean installation — not too aggressive (man, there are some caveats to tweaking and removing stuff with nLite!). The ISO is really awesome.
Now, in the spirit of the moment, I'm trying to put together a post-install batch script that'll apply the last handful of tweaks that I can't do with nLite but I'd still like to automate.
One such tweak is disabling the disk cache, since there's already caching going on in my host OS, so I'd much prefer that Windows didn't use any of its precious (and scarce) memory on disk caching.
It's easy enough to do using the GUI once everything is set up, but it'd be really cool if I could do it in my batch script. Either specifically turning off disk caching on each drive (I have two drives in my setup, one of them is persistent for swap and temp files so they don't waste space in snapshots), or perhaps there's a system service or similar that could be turned off, disabling caching system-wide in one go?
Thanks in advance for any ideas :)
EDIT: Just to avoid the "disabling write caching is bad" debate (I'd really just like answers to my question :) Thanks).
ATTO benchmarks for no write caching (left) and write caching (right):
EDIT 2: As per inspiration by @techie007, I've tried to determine the memory benefits from turning off caching in the first place. As you can see by these screenshots, nothing is really gained by turning off caching, at least memory-wise. Any change here would be entirely within statistical uncertainty.
For the record, I didn't quite know the best way to do this, so for both runs I rebooted the machine, let it settle for a bit, then ran ATTO and monitored mem usage during and after a run.
First two are with write caching enabled (during ATTO, then after):
Next two are the same scenario, but with write caching disabled: