jeffw_00 Posted April 9 Posted April 9 Hi - I had just updated my PC to Windows 11. I found that an old exe I used for dismounting drives in scripts no longer worked. Following some bad instructions on the web I did a mountvol /p on a drive. Somehow this made it so this drive would never automount (i.e. if I unmount it (mountvol /D), and disconnect it, and later connect it, it doesn't show up as a drive with a letter, I need to do a mountvol <letter>: <label> where the <label> is a long descriptor like \\?\Volume{long hex string>\.) I appear to have either done something permanent to the drive, marking it "don't automount me", or (more likely) made some permanent entry in some table in Windows marking this drive by label as "don't mount automatically". Does anyone know how to undo this? (the effect of a mountvol /p?) For reference see below. yes this was a dumb thing to do without reading the below twice. mountvol /P Removes the volume mount point from the specified directory, dismounts the volume, and makes the volume not mountable. You can make the volume mountable again by creating a volume mount point. I assume the "creating a volume mount point" is the mountvol command I now have to use to mount it. Using it does not cause the drive to later automount without giving that command. Thank You! /j Quote
goretsky Posted April 12 Posted April 12 Hello, I have mostly used DiskPart for volume management, but between looking at https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mountvol and https://www.tenforums.com/tutorials/117336-enable-disable-automount-new-disks-drives-windows.html it seems the command to re-enable the automatic mounting of disk volumes is mountvol /e from an elevated Command Prompt. Regards, Aryeh Goretsky Quote
jeffw_00 Posted April 12 Author Posted April 12 Thanks goretsky - But that command does not take a specific disk as an argument - it was one of the first things I tried, and it didn't help with this drive. Any other ideas? Thanks! Quote
Bookmem Posted April 12 Posted April 12 6 hours ago, jeffw_00 said: Thanks goretsky - But that command does not take a specific disk as an argument - it was one of the first things I tried, and it didn't help with this drive. Any other ideas? Thanks! Have you tried using "Disk management" to assign the drive a drive letter? 1 Quote
goretsky Posted April 13 Posted April 13 16 hours ago, jeffw_00 said: Thanks goretsky - But that command does not take a specific disk as an argument - it was one of the first things I tried, and it didn't help with this drive. Any other ideas? Thanks! Hello, Have you restarted the system since performing the mountvol /e command? Does the volume show up, either in the Windows Explorer or Disk Management? Regards, Aryeh Goretsky Quote
jeffw_00 Posted April 13 Author Posted April 13 (edited) Goretsky - yes, several times Let me explain in more detail. I have an external USB drive that is usually powered down. Before I did something stupid (mountvol /p <drive letter>), whenever I powered it up the drive just appeared in file manager. After I did the stupid thing, the drive does not appear automatically, I have to mount it using some manual method. This is true after several reboots. Either the drive is somehow marked "don't mount me", or the PC has noted not to mount the drive automatically, and there doesn't seem to be a way to undo the stupid thing. :-(. TIA for any other suggestions for me to try. /j Edited April 13 by jeffw_00 Quote
goretsky Posted April 15 Posted April 15 Hello, Did @Bookmem's suggestion to assign the drive a new letter via Disk Management (filename DISKMGMT.MSC) make any difference? Regards, Aryeh Goretsky Quote
jeffw_00 Posted April 17 Author Posted April 17 Sorry -everything I try doesn't stick - next time I power up the drive I have to mount it (assign drive letter) manually Quote
Bookmem Posted April 17 Posted April 17 4 hours ago, jeffw_00 said: Sorry -everything I try doesn't stick - next time I power up the drive I have to mount it (assign drive letter) manually You didn't answer the question. Did you use Disk Management to assign a drive letter? Quote
crp Posted April 18 Posted April 18 "automount enable" from DiskPart didn't work? Quote DISKPART> help automount Enables or disables the automount feature. Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR] ENABLE Enables Windows to automatically assign drive letters to volumes that are added to the system. DISABLE Prevents Windows from automatically assigning drive letters to volumes that are added to the system. SCRUB Removes mounted folder pathnames, drive letters, mounted folder directories, and registry settings, for volumes that are no longer in the system. This prevents volumes that were previously in the system from being automatically assigned their former drive letters and mounted folder pathnames when they are reintroduced to the system. NOERR For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without the NOERR parameter, an error causes DiskPart to exit with an error code. When the AutoMount feature is enabled (the default on some versions of Windows Server), Windows automatically brings the volume online, and, assigns a drive letter and a volume GUID pathname to the volume, when the volume is added to the system. In storage area network (SAN) configurations, disabling AutoMount prevents Windows from automatically onlining the volume and assigning drive letters or volume GUID pathnames to any new volumes that are visible to the system. Note that the AutoMount feature could only be applied to basic disk volumes on Windows versions released prior to Windows Vista. Starting with Windows Vista, the AutoMount feature can be applied to both basic and dynamic disk volumes. Example: AUTOMOUNT AUTOMOUNT ENABLE AUTOMOUNT DISABLE Quote
jeffw_00 Posted April 18 Author Posted April 18 @BOOKMEM, Yes, I used Disk Management to assign a drive letter, more than once. It did not help. Quote
Bookmem Posted April 18 Posted April 18 (edited) 2 hours ago, jeffw_00 said: @BOOKMEM, Yes, I used Disk Management to assign a drive letter, more than once. It did not help. Do you have another computer you can use to test the drive? If not, what I would do would be to download a Linux distro you can flash to USB stick and boot to it. Then use gparted to clear all of the flags. Edited April 18 by Bookmem Quote
jeffw_00 Posted April 19 Author Posted April 19 (edited) Thanks everyone for their help. Diskpart -> AUTOMOUNT ENABLE didn't change things I ran gparted - the only flag on the partition, which was "msft<something>", was the same flag that was set for my partitions on all my other drives. nothing to see there, I think. I guess I need to see if it comes up automatically connected to a different PC - will get to that soon. (and if it does, then somehow my PC has it marked as "don't automount" ) /j Edited April 19 by jeffw_00 Quote
b2cm Posted April 24 Posted April 24 Back up your files (not clone the drive). Repartition (delete/create new) and reformat your external drive. Remove and reconnect the drive. If it automounts, copy back your files. Quote
jeffw_00 Posted April 25 Author Posted April 25 Hi - I attached the external drive to another PC and when it powered up it automounted just fine. I suppose it's possible that if I wipe the drive, and reformat it, that will fix the problem, but it's a lot to do for a solution that isn't certain (the drive will still have the same physical ID). It really seems like I have to find (in the registry), the place where it has this drive marked "never mount" and clear the info. Anyone know where to look? Thanks! /j Quote
Bookmem Posted April 26 Posted April 26 On 4/19/2025 at 6:33 PM, jeffw_00 said: Thanks everyone for their help. Diskpart -> AUTOMOUNT ENABLE didn't change things I ran gparted - the only flag on the partition, which was "msft<something>", was the same flag that was set for my partitions on all my other drives. nothing to see there, I think. I guess I need to see if it comes up automatically connected to a different PC - will get to that soon. (and if it does, then somehow my PC has it marked as "don't automount" ) /j That is because you have fastboot enabled in windows. That means when you shutdown, you are leaving some files open as if you were 'hibernating" instead of a full shutdown. Disable fastboot and those flags will disappear. 1 Quote
jeffw_00 Posted April 26 Author Posted April 26 (edited) @Bookmem - good idea - but it didn't work. I disabled Fast Boot, and tried booting a few times (even shutdown/powerup a couple of times) - no difference. Sorry. I still think it's a registry thing... Edited April 26 by jeffw_00 Quote
goretsky Posted April 26 Posted April 26 Hello, It's definitely a setting that is specific to the PC. It's even possible it is a bug that is preventing auto-mounting from being re-enabled. Out of curiosity, have you tried marking the partition as ACTIVE using DiskPart? That will not change anything other than telling the computer it is a bootable partition. Another thing to try might be removing the all entries related to the drive from the Device Manager and let it be re-detected the next time it is plugged in. Neither of the above are options which should affect drives from being automatically mounting, so I am kind of guessing at this point. Regards, Aryeh Goretsky Quote
crp Posted April 27 Posted April 27 What is nuts to me is that I've had and seen the reverse problem. Never saw anyone having this issue. What does the registry key HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices show , with the drive in and with it out? Quote
Bookmem Posted April 28 Posted April 28 (edited) On 4/26/2025 at 12:18 PM, jeffw_00 said: @Bookmem - good idea - but it didn't work. I disabled Fast Boot, and tried booting a few times (even shutdown/powerup a couple of times) - no difference. Sorry. I still think it's a registry thing... I didn't mean that disabling fastboot would cure your problem. I meant that it would remove the flags so that gparted could modify the drive. But that is ONLY if the problem is with the drive and not Windows. Did you ever get to test the drive with another computer? You might want to try resetting Windows while keeping files and apps. Edited April 28 by Bookmem Quote
jeffw_00 Posted April 28 Author Posted April 28 (edited) @Bookmem - as I posted above- drive works great with another PC - automounts without issue. It's something with this PC - maybe a registry setting that needs to be changed... @Goretsky, @crp - will try these ideas later this week. Thanks! - I can try attaching the drive, removing from device manager and rebooting. - I can look at the registry flags, although I would expect the registry flag to reflect what I see in disk management - I can see when a letter is assigned and when it isn't. Thanks! /j Edited April 28 by jeffw_00 Quote
jeffw_00 Posted May 3 Author Posted May 3 Nothing interesting in the registry that I saw. However.. With the drive mounted, I uninstalled it from Device Manager (and it disappeared from the mounted drives in File Explorer as I would expect). I then did a reboot, and the system did automount the drive! However, after I unmounted it with the mountvol /D command, and powered it off. When I powered it on a bit later it would not automount, I needed to do the mountvol <letter> <label> command as I have been doing to work around this issue. Thanks anyway guys - I guess I'll just stick with the workaround. /j Quote
Bookmem Posted May 3 Posted May 3 5 hours ago, jeffw_00 said: Nothing interesting in the registry that I saw. However.. With the drive mounted, I uninstalled it from Device Manager (and it disappeared from the mounted drives in File Explorer as I would expect). I then did a reboot, and the system did automount the drive! However, after I unmounted it with the mountvol /D command, and powered it off. When I powered it on a bit later it would not automount, I needed to do the mountvol <letter> <label> command as I have been doing to work around this issue. Thanks anyway guys - I guess I'll just stick with the workaround. /j Why did you run that command again when it gave you so much trouble the first time? Why not just use the "Safely remove hardware and Eject Media" from the task bar? Quote
jeffw_00 Posted May 4 Author Posted May 4 @Bookmem- it was mountvol /P that gave me problems, not mountvol /D. I need to have a way to script the mount/dismount (that's how it all started). Quote
Bookmem Posted May 4 Posted May 4 3 hours ago, jeffw_00 said: @Bookmem- it was mountvol /P that gave me problems, not mountvol /D. I need to have a way to script the mount/dismount (that's how it all started). If you need to script, you should be using Linux. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.