How do you reset a USB flash drive back to factory settings?

Page 2 of 4 FirstFirst 1234 LastLast

  1. Posts : 31,670
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #11

    Bree said:
    Exactly the way they were when you bought them may not be possible. Many USB flash drives came formatted without using a boot record of any sort.....
    More on that, with examples, here....
    For testing purposes, I have a 3rd-party 'USB image' app that let's me restore an image of the USB that I took before using it. Notice the subtle difference (info courtesy of MiniTool Partition Wizard) between these two apparently identical Lexar 8GB USBs (both were from the same multipack). The first is as it was originally formatted by Lexar, the second is after using the MCT (so it now has an MBR). In particular, look at the partition type and first physical sector.



    ...Disk Management can manage partitions on the second Lexar, it cannot on the first one...
    Cumulative Update KB4048955 Windows 10 v1709 Build 16299.64 (post #96)
      My Computers


  2. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #12

    Bree said:
    Exactly the way they were when you bought them may not be possible. Many USB flash drives came formatted without using a boot record of any sort. The only way I know to 'factory reset' to original manufacturer's condition is to restore an image I took before I first used them.

    Your Diskpart commands will make the USB look clean and empty, but it will have created an MBR for the partition. This is not strictly 'as bought', but close enough for most purposes - in fact, in some ways it's better. A USB without a MBR cannot be managed in Disk Management, it needs a partition table to manipulate.
    Thanks for that Bree I'm also seeking some clarification on exactly what the Assign command does? I only want a dynamically assigned drive letter for my flash drives (not a fixed letter). Does the Assign command set a dynamic letter...or does it set the drive to the next available letter and fix it on that drive letter?
      My Computer


  3. Posts : 5,330
    Windows 11 Pro 64-bit
       #13

    Assigns a drive letter or mounted folder pathname to the volume with focus. You don't need to worry about connecting any other storage drive Windows will assign a new drive letter to newly connected storage drive.
      My Computer


  4. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #14

    Bree said:
    More on that, with examples, here....
    Cumulative Update KB4048955 Windows 10 v1709 Build 16299.64 (post #96)
    Yeah I see what you mean Bree. Like you say its better for it to have the MBR set up on it anyway so it can be managed in disk management
      My Computer


  5. Posts : 31,670
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #15

    FreeBooter said:
    If we are talking about USB flash drive far as i know USB flash drive cannot be converted as a GPT disk partition format....
    It's easily done (sometimes unintentionally with Rufus). That takes us full-circle to sportsfan148's initial problem that started the interest in 'cleaning' USBs. I used MiniTool Partition Wizard to convert a USB to gpt for this test...

    Bree said:
    ...I have now confirmed that the Media Creation Tool fails with error code 0x80004005 - 0xA001A if the USB you ask it to use has a gpt partition...
    USB flash drive --assign drive letter back to dynamic from static
      My Computers


  6. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #16

    FreeBooter said:
    Assigns a drive letter or mounted folder pathname to the volume with focus. You don't need to worry about connecting any other storage drive Windows will assign a new drive letter to newly connected storage drive.
    I know it will assign a drive letter to the USB flash drive but does the Assign command fix that drive letter permanently on that particular drive...or will Windows assign a different (dynamic) drive letter to that drive as and when required even though I had used the Assign command on it when I reset the drive with Diskpart? To put it another way when you use the Assign command on its own without selecting a letter with it (assign letter=Z for example)...does that set the flash drive up to have a different dynamic drive letter assigned to it, if required, each time it is plugged into the laptop?
      My Computer


  7. Posts : 5,330
    Windows 11 Pro 64-bit
       #17

    Assign command does not assign a different (dynamic) drive letter each time you have connect same storage drive.
      My Computer


  8. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #18

    FreeBooter said:
    Assign command does not assign a different (dynamic) drive letter each time you have connect same storage drive.
    How do I make it so that the USB flash drive has a drive letter assigned to it dynamically when its plugged in then...exactly the same as it is when you purchase a new USB flash drive? When you purchase a new flash drive..the drive letter is dynamic not fixed. That's all I'm trying to achieve
      My Computer


  9. Posts : 5,330
    Windows 11 Pro 64-bit
       #19

    Sorry i have no idea how to do that maybe what you are asking can be achieve by not assigning a drive letter when you format USB flash drive.
      My Computer


  10. Posts : 5,478
    2004
       #20

    Bree said:
    More on that, with examples, here....
    You are quite right of course. If you wanted it exactly the same you'd have to restore it but who would back up an empty USB drive?

    In fact the second partition type (0xC) in your example is correct for USB stick. The first one (0xB) is for CHS (old style HDD). MS got it right and Lexar got it wrong if you want to be pedantic about it (and if you trust Wikipedia). Mind you I manually assign partition types a lot (I have to use hybrid GPT/MBR partition scheme) and always give the 0x7 irrespective if they are FAT or NTFS and that works too so it probably doesn't matter.

    sportsfan148 said:
    How do I make it so that the USB flash drive has a drive letter assigned to it dynamically when its plugged in then...exactly the same as it is when you purchase a new USB flash drive?
    Delete its record from the registry.

    First assign it some letter like Z so you know what it is. Doesn't matter how - through Disk Management or diskpart assign letter=z - the result is the same.

    Then unplug it. Then go to regedit and delete HKLM\SYSTEM\MountedDevices value \DosDevices\Z:

    Next time you plug it in it will assign E or whatever is the first unallocated letter.

    It is nothing to do with the USB - only your Windows install.

    How do you reset a USB flash drive back to factory settings?-capture.png
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:25.
Find Us




Windows 10 Forums