Default disk cache profile for removable storage

  • Thread starter Thread starter Eric Falsken
  • Start date Start date
E

Eric Falsken

In our XPE solution, we use a lot of user-inserted USB sticks/ZIP
disks/Removable DVD-RAM disks/etc. For the USB sticks, write-caching is set
to quick removal, as it should be. But zip drives and DVD-RAM drives
(Removable Storage) are always set up with the policy set to "Enable Write
Caching".

I know it's a lot of trouble to bypass write caching on a system (boot)
drive, and hard disks. But how can I set the default caching level on
removable drives, even when the OS recognizes them as removable drives?
 
The following links may be helpul to you:
http://support.microsoft.com/default.aspx?kbid=811392
http://groups-beta.google.com/group/microsoft.public.windowsxp.emb
edded/browse_frm/thread/85bb46a8025c298b/b3968a4f0ad928fe#b3968a4f
0ad928fe

I did read both of those threads before I posted. They had a lot of
wonderful information. But in both cases, they were dealing with their boot
drives. I'm more interested in configuring caching for certain types of (or
all) non-system drives. I just want to set the default policy
 
Eric,

Not sure why you thought dskcache utility has anything to do with system partitoin only. Unfortunately, I don't have the utility and
can't test it.

Anyway, if you are talking about "Enable write caching on the disk" policy option then running Regmon shows the value you may want
to tweak: [HKLM\SYSTEM\CurrentControlSet\Enum\IDE\your disk id here\Device Parameters\Disk],"UserWriteCacheSetting". If you
enumerate the Enum\IDE branch at run time and set the UserWriteCacheSetting=dword:0 that should disable the write caching for all
the IDE disks (you can enable it back for fixed disks).

KM
 
Eric,

Not sure why you thought dskcache utility has anything to do with
system partitoin only. Unfortunately, I don't have the utility and
can't test it.

I didn't mean that the utility was only for non-system disks. I meant
that the other difficulties with caching that I've seen when reviewing
the other posts in this group always are dealing with system disks. (or
at lease a majority of the time) As was being discussed in the second
link that was posted the first response.
Anyway, if you are talking about "Enable write caching on the disk"
policy option then running Regmon shows the value you may want to
tweak: [HKLM\SYSTEM\CurrentControlSet\Enum\IDE\your disk id
here\Device Parameters\Disk],"UserWriteCacheSetting". If you enumerate
the Enum\IDE branch at run time and set the
UserWriteCacheSetting=dword:0 that should disable the write caching
for all the IDE disks (you can enable it back for fixed disks).

Hmm, that may be good enough, but we allow users to plug in new
devices/USB media, and would like a way to set these values all the
time, or to set the defaults for "new devices" somewhere in FirstBoot or
pre-FirstBoot. A glance at Disk.inf reveals something about
ExpectSurpriseRemoval which should "disable all levels of caching". Now
if only I could find the RemovalPolicy registry key. The only reference
to ExpectSurpriseRemoval and RemovalPolicy I can find in the MSDN is in
the IOCTL_STORAGE_SET_HOTPLUG_INFO operation and the STORAGE_HOTPLUG_INFO
structure. Does anyone else have any information about this value/key?
 
Back
Top