Hello Experts,
I have created a USB Mass Storage device with a PDIUSBD12 target
controller. I have successfully written the target side driver and am
able to do all kinds of disk operation on it.
I now have a requirement of selectively preventing disk operations as
below:
a) Prevent users from creating any directories on the disk
b) Prevent users from formatting the disk
c) Prevent users from storing any file on the disk whose name is NOT
"MyFile.bin"
I have been able to do all the above successfully in Windows XP because
when ever the user performs a disk operation, XP first writes data to
the "root directory" sectors and then to the rest of them. So, whenever
I get a request for any disk operation that needs to write to the "root
directory" sectors, I first do a validation on the root directory
related data and if it does not meet the above constraints, I stall the
operation and return a "Write Protect" status in the the following
request sense command. All this works perfectly well in XP.
However in Windows 2000, the sequence of disk operation is different.
The root directory is NOT written to first. Due to this reason, I am
not able to do such a validation on the same.
This difference in behaviour in Win 2K is because the mass storage
driver is configured for "Better performance" than "Quick Removal". In
Win 2K there is no option to change this seeting (unlike Win XP). Is
there a registry tweak to change this setting? Thanks.