Why is a subst drive usable from a command prompt but not Windows 7 explorer
Solution 1
This command creates a persistent Z: subst of C:\DirectoryName
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices" /v Z: /t REG_SZ /d "\??\C:\DirectoryName" /f
Solution 2
This probably happens because the run command runs elevated (as administrator). If you run the subst command not elevated you will see it in Windows Explorer. You can test this running the subst on an elevated command prompt.
Solution 3
Use PSubst 3 utility. It is a DOS batch file that maps a drive permanently. Works in every windows version after XP.
Download latest version Direct link
Solution 4
https://github.com/ildar-shaimordanov/psubst
This is original repository of the psubst
tool enabling SUBSTed drives be persistent between rebooting.
Related videos on Youtube
Dan
Updated on September 17, 2022Comments
-
Dan almost 2 years
I have a registry key under
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
The value of the key is"c:\windows\system32\cmd.exe" /c subst t: e:\MyFolder
More often than not when I boot the computer the subst command appears to only half work. If I open a command prompt I can use t: fine. However if I look in windows explorer T: is not there and if I type it into the address bar I get an error message saying "Windows can't find 't:'. Check the spelling and try again."
This is on Windows 7 Enterprise 64 bit.
Any ideas?
-
Xantec over 13 yearsi've never used subst myself, but this is what Wikipedia has to say on setting up a persistent mapping. hope it helps
-
Pacerier over 8 years@Dan, Here: How to make SUBST mapping persistent across reboots? ..
-
LawrenceC over 6 yearsThere are so many layers of APIs and wrapper .DLLs in Windows that it's actually surprising when you make a change that is indeed visible everywhere. The command first appeared under DOS so that's it's "expected" environment.
-
-
Jim Fell over 11 yearsI tried this, but it still didn't take.
-
Victor Zakharov over 10 years+1. Still works in Windows Server 2012. Needs a restart.
-
Mickey Perlstein over 10 yearsDid not believe this would work, but you were right! it worked i mapped my dropbox to Z: on the fly. well done
-
Starnuto di topo over 8 yearsDoes not work on Windows 10
-
Eryk Sun almost 8 years@Starnutoditopo, it works fine in Windows 10, assuming the cmd shell isn't elevated.
-
Julius Bullinger over 6 yearsIt does not work on my Windows 10 machine with version 1607/build 14393. Can anyone confirm?
-
vic over 4 yearsWindows 2019 Server, still works, so Win10 should work, too. But because the setting is in HKLM, a reboot is required, a mere logoff is not enough.