Question: Yesterday, my USB flash drive came up with a strange behaviour: **It autoejects itself directly after insertion.**

The device is a Sandisk Cruzer 32GB. The last action I did was removing `autostart.ini` from the stick (I think this is irrelevant but I am going to mention it).

After inserting the stick, the Windows sound for recognizing a USB device is played. If I am fast enought I can see the device under ejectable devices. However after approximately five seconds the sound of ejection is played and the device is lost (I've recorded and uploaded the sound sequence [here](https://clyp.it/iobdootw)).

I also checked Device Manager and Disk Management but my USB flash drive is not there. I'm therefore unable to format my USB flash drive.

I also tried to access the USB flash drive with Windows 7 and Ubuntu (on other devices) but the result was always the same.

I searched Google but found no information about the problem like I have. Is my problem caused by software or is it a hardware defect? In the event that the error is caused by software - is there a way to fix it? Not least through losing all the data.

**EDIT:**

During the five seconds the device is connected, I can see the device in the USBDeview - tool:

[![enter image description here](https://i.stack.imgur.com/YG5DB.png)](https://i.stack.imgur.com/YG5DB.png)

Answer: 
Unless you are getting a popup telling you it's safe to unplug the device, then the sound you're hearing is probably just the hardware disconnect sound, and not an actual Eject.

So if you've tried it in multiple USB ports, machines, and OSs, and it keeps happening, then it sounds like you simply have a broken USB flash drive. Try a different (known-good) flash drive, and if it works, throw out the faulty SanDisk and get a replacement.
It sounds like you have a virus infection. The Sandisk is notoriously known for puting some questionable self-executable malware on its flash drives, for so-called security or whatever. There used to be a special hack tool to remove that stuff in the past.