Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I remove the USB storage device driver from Windows XP, such that the next time a USB storage device is plugged in the Plug-and-Play infrastructure will install the driver before mounting the device? I tried deleting USBSTOR.SYS, but Windows automagically restores it a few seconds later.

Background

I want to use MS KB 823732 to temporarily USB storage devices by setting the HKLM\...\Services\UsbStor registry key to "4". However, this article states that this only works if a USB storage device is already installed on the PC.

If a USB storage device is NOT already installed then:

Windows' plug & play subsystem automatically resets the Start value to 3 (Manual) when it installs USBSTOR after a USB storage device is plugged in for the first time

I want to test my application's behavior in the case that a USB storage drive is not installed, but I don't know how what to remove to do that.

share|improve this question
1  
You asked a really similar questions recently. What exactly are you trying to do? –  geocar Feb 22 '10 at 15:51
    
@geocar: My other question was targeted at identifying different options for programmatically restricting access to USB storage devices. This question deals with one of those options in particular. In this question, I ask about to reproducing a system state in which a USB storage drive is not yet installed. Are my questions unclear? I haven't worn my sysadmin hat in over 6 years, so if I'm not making any sense please let me know... –  Seth Petry-Johnson Feb 22 '10 at 16:05

1 Answer 1

I ask about to reproducing a system state in which a USB storage drive is not yet installed.

Then start by making a system like that.

If you can use a virtual machine, then make the system in the virtual machine. Most virtual machines support snapshotting, which can be used to "roll the whole system back".

Also: VMWare (for example) has an option to use the host's usb devices directly with the guest; Qemu has a -usbdevice disk:file.img for simulating a usb "disk".

If you cannot use a virtual machine, You can then use System Restore to checkpoint (and roll back) to your hardware configuration.

I don't recommend this if you're developing on the system that you're testing on. System Restore isn't very reliable. If you cannot afford a legitimate copy of Microsoft Windows, you can still download a copy of Windows PE for no-cost.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.