PC Review


Reply
Thread Tools Rate Thread

Defaulting drives for "quick removal" not "performance"

 
 
Black Shuck
Guest
Posts: n/a
 
      19th Jul 2004
I want to set a global default for any disks, so they default to "quick
removal". I can seem to find a way to do this. The problem is, is that
I may make my image on a system and set it to "safe removal", but the
harddisk model, firmware, or something else may change, XPe then treats
this as a new device, and defauts it back to "performance" settings.

This is causing us particular relibility problems, as on occasion we
have data corruption product where the power from the system is removed
without proper shutdown. We don't need the performance gain that write
caching gives us, and would rather disable it across the board.

Is there some solution to this??

--
"This dog don't give a feck..."
 
Reply With Quote
 
 
 
 
Slobodan Brcin \(eMVP\)
Guest
Posts: n/a
 
      19th Jul 2004
Hi Black,

Registry value UserRemovalPolicy is used for this purpose just set it to 3. classpnp.sys is the only functional part of driver that
use this value.
Unfortunately by default this value does not exist and it must be related to each disk driver instance in registry.

So the only way to enter this value automatically is to let PnP do it when it finds new disk.

You will have to change disk.inf in a way that when new HDD is detected by PnP it will add registry value that I mentioned.

HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR\ .... DiskName.... \ ...DiskInstanceId.. \Device Parameters\ClassPnP\UserRemovalPolicy
DWORD 3

When using PnP for changing registry keys you can rely on relative paths, so path prior to "Device Parameters" will be used as
assumed values for each new disk instance.

As you can see this can't be used from TD since DiskInstanceId is based on DISK serial number. I don't know if there is universal
registry master switch for this purpose.

Best regards,
Slobodan

PS:
Also there is another registry entry that might interest you "RemovalPolicy".


"Black Shuck" <(E-Mail Removed)> wrote in message news:40fc0797$0$4535$(E-Mail Removed)...
> I want to set a global default for any disks, so they default to "quick
> removal". I can seem to find a way to do this. The problem is, is that
> I may make my image on a system and set it to "safe removal", but the
> harddisk model, firmware, or something else may change, XPe then treats
> this as a new device, and defauts it back to "performance" settings.
>
> This is causing us particular relibility problems, as on occasion we
> have data corruption product where the power from the system is removed
> without proper shutdown. We don't need the performance gain that write
> caching gives us, and would rather disable it across the board.
>
> Is there some solution to this??
>
> --
> "This dog don't give a feck..."



 
Reply With Quote
 
Michael Bate
Guest
Posts: n/a
 
      15th Sep 2006

This information appears to be very useful, but it is two years old
(July 2004). I think that predates SP2.

Is this still correct, or is there a newer and better way to set devices
for "Quick Removal." I am concerned about USB thumb drives that might
be pulled out prematurely. I am willing to give up the performance gain
provided by disk caching.

Thanks in advance,
Michael Bate

Slobodan Brcin (eMVP) wrote:
> Hi Black,
>
> Registry value UserRemovalPolicy is used for this purpose just set it to 3. classpnp.sys is the only functional part of driver that
> use this value.
> Unfortunately by default this value does not exist and it must be related to each disk driver instance in registry.
>
> So the only way to enter this value automatically is to let PnP do it when it finds new disk.
>
> You will have to change disk.inf in a way that when new HDD is detected by PnP it will add registry value that I mentioned.
>
> HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR\ .... DiskName.... \ ...DiskInstanceId.. \Device Parameters\ClassPnP\UserRemovalPolicy
> DWORD 3
>
> When using PnP for changing registry keys you can rely on relative paths, so path prior to "Device Parameters" will be used as
> assumed values for each new disk instance.
>
> As you can see this can't be used from TD since DiskInstanceId is based on DISK serial number. I don't know if there is universal
> registry master switch for this purpose.
>
> Best regards,
> Slobodan
>
> PS:
> Also there is another registry entry that might interest you "RemovalPolicy".
>
>
> "Black Shuck" <(E-Mail Removed)> wrote in message news:40fc0797$0$4535$(E-Mail Removed)...
>
>>I want to set a global default for any disks, so they default to "quick
>>removal". I can seem to find a way to do this. The problem is, is that
>>I may make my image on a system and set it to "safe removal", but the
>>harddisk model, firmware, or something else may change, XPe then treats
>>this as a new device, and defauts it back to "performance" settings.
>>
>>This is causing us particular relibility problems, as on occasion we
>>have data corruption product where the power from the system is removed
>>without proper shutdown. We don't need the performance gain that write
>>caching gives us, and would rather disable it across the board.
>>
>>Is there some solution to this??
>>
>>--
>>"This dog don't give a feck..."

>
>
>

 
Reply With Quote
 
steves
Guest
Posts: n/a
 
      15th Sep 2006
Michael,

AFAIK, this is still required. I have not succeeded in getting TD to
overwrite the built-in disk.inf (component build order problem?), so I
copy the disk.inf file given below onto the image before running FBA
(part of an automated script), and have not had any further problems
with this.

Steves
SteveSATeyeDASHimagingDOTcom


;----------------------------------------------------------------------------
;Rem Modified Disk.Inf
;
; Modifications List:
;
; 12/06/2005 Added section [disk_install.NT.HW],
; with AddReg = Expect Surprise removal...
;
;----------------------------------------------------------------------------
[Version]
Signature="$WINDOWS NT$"
Class=DiskDrive
ClassGuid={4D36E967-E325-11CE-BFC1-08002BE10318}
Provider=%MSFT%
LayoutFile=layout.inf
DriverVer=07/01/2001,5.1.2535.0

[ClassInstall32.NT]
DelReg=disk_class_delreg
AddReg=disk_class_addreg
Copyfiles=storprop_copyfiles

[disk_class_delreg]
HKR,,EnumPropPages32

[disk_class_addreg]
HKR,,,,%DiskClassName%
HKR,,Installer32,,"StorProp.Dll,DiskClassInstaller"
HKR,,SilentInstall,,1
HKR,,NoInstallClass,,1
HKR,,TroubleShooter-0,,"hcp://help/tshoot/tsdrive.htm"
HKR,,Icon,,"-53"
HKR,,DeviceType,0x10001,7 ; FILE_DEVICE_DISK
HKR,,DeviceCharacteristics,0x10001,0x100 ; Use same security
checks on relative opens

;;
;; The AutoRunAlwaysDisable key is only for use when the hardware
cannot
;; accepts TEST_UNIT_READY commands. Disabling 'AutoRun' or
including
;; devices in this list will prevent removable media services from
being
;; able to properly handle these devices.
;;

[autorun_addreg]
HKLM,"System\CurrentControlSet\Services\disk","AutoRunAlwaysDisable",
0x00010008, "Brother RemovableDisk(U)"

[disk_copyfiles]
disk.sys

[storprop_copyfiles]
storprop.dll

[DestinationDirs]
disk_copyfiles=12
storprop_copyfiles=11

[Manufacturer]
%GenManufacturer%=disk_device
%Compaq%=compaq
%Mylex%=mylex

[disk_device]
%disk_devdesc% = disk_install, GenDisk
%opticaldisk_devdesc% = disk_install, GenOptical
%disk_devdesc% = disk_install, USBSTOR\DiskSony____MSC-U01_________
%disk_devdesc% = disk_install, USBSTOR\DiskSony____MSC-U01N________
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\FUJITSU&DynaMO-FE_OPTICAL_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\&SYM13FW500-DISK_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\&WDxxxA001RTL-Disk_Drive&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MAC_TECHNOLOGIESINC.&MAC_THIN_FIREWIRE_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\VST_TECHNOLOGIESINC.&VST_THIN_FIREWIRE_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\Sony&PCVA-HD04&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LSI_Logic&SYM13FW500-DISK_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MELCO_INC&1394MEL-HD_DRIVE_&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MELCO_INC&1394MEL-HD_DRIVE&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MELCO_INC&1394MEL-MO_DRIVE_&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LMO-PFU&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LMO-AF&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\OXFW900_&LHD-SF__&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LHD-PFU&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LHD_AF&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\I-O_DATA_DEVICE_INC.&1394_Converter__&CmdSetId104d8&GenDisk
%disk_devdesc% = expect_surprise_removal_disk_install, LEXARUSB\GenDisk
%disk_devdesc% = expect_surprise_removal_disk_install,
SCSI\DiskToshiba_SD_Mem_Driver___

[compaq]
%compaq_array.DeviceDesc% = disk_install,
SCSI\DiskCompaq__Disk_Array______

[mylex]
%mylex_array.DeviceDesc% = disk_install, SCSI\DiskMYLEX___

[expect_orderly_removal_disk_install.NT]
CopyFiles=disk_copyfiles

[expect_orderly_removal_disk_install.NT.Services]
AddService=disk,2,disk_ServiceInstallSection

[expect_orderly_removal_disk_install.NT.HW]
AddReg=expect_orderly_removal_disk_install_HW.AddReg

[expect_orderly_removal_disk_install_HW.AddReg]
HKR,,"RemovalPolicy",0x00010001,0x2 ; ExpectOrderlyRemoval

[expect_surprise_removal_disk_install.NT]
CopyFiles=disk_copyfiles

[expect_surprise_removal_disk_install.NT.Services]
AddService=disk,2,disk_ServiceInstallSection

[expect_surprise_removal_disk_install.NT.HW]
AddReg=expect_surprise_removal_disk_install_HW.AddReg

[expect_surprise_removal_disk_install_HW.AddReg]
HKR,,"RemovalPolicy",0x00010001,0x3 ; ExpectSurpriseRemoval
HKR,"ClassPnP","UserRemovalPolicy",0x00010001,0x3 ;
ExpectSurpriseRemoval

[disk_install.NT]
CopyFiles=disk_copyfiles
ExcludeId=GenSFloppy,SCSI\DiskMATSHITALS-120_COSM___04,SCSI\DiskCOMPAQ__LS-120_VER5___AB
ExcludeId=SCSI\DiskCOMPAQ__LS-120_HIMA___01,SCSI\DiskMATSHITALS-120_VER5___00
ExcludeId=SCSI\DiskMATSHITALS-120/240____00
DiskCiPrivateData=4

[disk_install.NT.HW]
AddReg=expect_surprise_removal_disk_install_HW.AddReg

[disk_install.NT.Services]
AddService=disk,2,disk_ServiceInstallSection

[disk_ServiceInstallSection]
DisplayName=%disk_ServiceDesc%
ServiceType=1
StartType=0
ErrorControl=1
ServiceBinary = %12%\disk.sys
AddReg=autorun_addreg

---- End modified disk.inf -----



Michael Bate wrote:
> This information appears to be very useful, but it is two years old
> (July 2004). I think that predates SP2.
>
> Is this still correct, or is there a newer and better way to set devices
> for "Quick Removal." I am concerned about USB thumb drives that might
> be pulled out prematurely. I am willing to give up the performance gain
> provided by disk caching.
>
> Thanks in advance,
> Michael Bate
>
> Slobodan Brcin (eMVP) wrote:
> > Hi Black,
> >
> > Registry value UserRemovalPolicy is used for this purpose just set it to 3. classpnp.sys is the only functional part of driver that
> > use this value.
> > Unfortunately by default this value does not exist and it must be related to each disk driver instance in registry.
> >
> > So the only way to enter this value automatically is to let PnP do it when it finds new disk.
> >
> > You will have to change disk.inf in a way that when new HDD is detected by PnP it will add registry value that I mentioned.
> >
> > HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR\ .... DiskName.... \ ...DiskInstanceId.. \Device Parameters\ClassPnP\UserRemovalPolicy
> > DWORD 3
> >
> > When using PnP for changing registry keys you can rely on relative paths, so path prior to "Device Parameters" will be used as
> > assumed values for each new disk instance.
> >
> > As you can see this can't be used from TD since DiskInstanceId is based on DISK serial number. I don't know if there is universal
> > registry master switch for this purpose.
> >
> > Best regards,
> > Slobodan
> >
> > PS:
> > Also there is another registry entry that might interest you "RemovalPolicy".
> >
> >
> > "Black Shuck" <(E-Mail Removed)> wrote in message news:40fc0797$0$4535$(E-Mail Removed)...
> >
> >>I want to set a global default for any disks, so they default to "quick
> >>removal". I can seem to find a way to do this. The problem is, is that
> >>I may make my image on a system and set it to "safe removal", but the
> >>harddisk model, firmware, or something else may change, XPe then treats
> >>this as a new device, and defauts it back to "performance" settings.
> >>
> >>This is causing us particular relibility problems, as on occasion we
> >>have data corruption product where the power from the system is removed
> >>without proper shutdown. We don't need the performance gain that write
> >>caching gives us, and would rather disable it across the board.
> >>
> >>Is there some solution to this??
> >>
> >>--
> >>"This dog don't give a feck..."

> >
> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
WinExplorer shows no "Used space/Free space" in properties for USB stick drive ? "Optimized for quick removal" error? Joe deAngelo Storage Devices 0 18th Jan 2008 01:28 PM
WinExplorer shows no "Used space/Free space" in properties for USB stick drive ? "Optimized for quick removal" error? Joe deAngelo Windows XP Hardware 0 18th Jan 2008 01:28 PM
WinExplorer shows no "Used space/Free space" in properties for USB stick drive ? "Optimized for quick removal" error? Joe deAngelo Windows XP Help 0 18th Jan 2008 01:28 PM
<FORM METHOD="post" onSubmit="return fieldcheck()" name="orientation" action="http://ws-kitty.BU.edu/AT/survey/orientation/script/write.asp" language="JavaScript"> Joeyej Microsoft ASP .NET 0 4th Jun 2004 08:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:51 AM.