- Windows 10 subst не работает
- Перестал работать пакетный файл Subst.exe в Windows 10, 8.1
- Запустить сканирование SFC
- Прекратите переключаться между MSAccess XP и MSAccess 2010
- Отключите антивирус / брандмауэр
- Создать новую учетную запись пользователя
- “Грабли” Microsoft или “засада” с командой SUBST в новейших Windows 10 и 2016
- Как создать виртуальный диск из папки в Windows 10.
- Чтобы создать виртуальный диск из папки в Windows 10,
- Найти виртуальные диски, созданные с помощью Subst.
- Как удалить диск, созданный с помощью subst.
- Создание виртуального диска с Subst при запуске Windows 10
- Как добавить команду «Создать диск из папки» в контекстное меню Проводника
- Windows 10 issue «Subst» command doesn’t work
- Replies (45)
Windows 10 subst не работает
Некоторые пользователи сообщают, что у них возникают проблемы с запуском Subst.exe в Windows 10, Windows 8.1 соответственно. Вот как выглядит жалоба:
У меня есть командный файл, который я использовал с Windows XP, вплоть до Windows 8.1 бета. Так как на этой неделе я установил полную версию 8.1, пакетный файл перестал работать: SUBST.EXE L: «c: developmentclientname» Я попытался щелкнуть правой кнопкой мыши на «Запуск от имени администратора», и «Сорта» работает… интересно… с MSAccess XP. Но продукты MSOffice 2010 не распознают букву диска в диалоговом окне «Открыть файл», а проводник Windows не отображает диск L :. Однако, если я иду в командную строку и набираю L: и нажимаю ввод, он распознает и переходит на диск L:…. Я попытался запустить командную строку непосредственно из командной строки (администратора) и те же результаты …
- Читайте также: Исправлено: Exe файлы не открываются в Windows 10
Перестал работать пакетный файл Subst.exe в Windows 10, 8.1
- Запустить сканирование SFC
- Прекратите переключаться между MSAccess XP и MSAccess 2010
- Отключите антивирус / брандмауэр
- Создать новую учетную запись пользователя
Эта ветка все еще открыта на форумах сообщества Microsoft, и мы пристально следим за ней в случае, если будет предоставлено рабочее решение. Между тем, вот несколько советов по решению, которые могут помочь вам решить проблему.
Запустить сканирование SFC
Те, на кого это влияет, должны сначала проверить Системные файлы, чтобы убедиться, что все системные файлы на месте. Если это не сработает, вы можете пойти дальше, и в командной строке администратора введите sfc / scannow для запуска. После этого просто следуйте инструкциям и перезапустите.
Прекратите переключаться между MSAccess XP и MSAccess 2010
Для некоторых проблема была вызвана тем, что пользователи часто переключаются между MSAccess XP и MSAccess 2010, поэтому, если вы делаете то же самое, остановитесь.
Отключите антивирус / брандмауэр
Иногда антивирусное программное обеспечение может блокировать запуск файлов .exe на вашем компьютере. Вы можете отключить антивирусную программу, а также брандмауэр и проверить, работает ли теперь файл Subst.exe. Не забудьте включить защиту от вирусов и брандмауэров после завершения тестов.
Создать новую учетную запись пользователя
Другие пользователи предположили, что создание новой учетной записи пользователя может решить эту проблему. Хотя это решение работает только в редких случаях, попробуйте его, поскольку оно может помочь вам решить проблему.
Так что, если у вас есть сведения о дополнительных исправлениях, сообщите нам, и мы сообщим об этом пострадавшим.
“Грабли” Microsoft или “засада” с командой SUBST в новейших Windows 10 и 2016
Всегда нравилось использовать команду SUBST. Удобно это. И для старых программ, и для, например, “укорачивания” пути к сетевым папкам. Частенько пользователи создают пути такой длины, что только диву даешься.
И никак не ожидал, что тут рассыпаны “грабли” Microsoft.
В чем же это выражается. А в том, что теперь есть два типа сессий с которыми можно работать: standard и, так называемая, elevated (когда программа запускается от имени Администратора)
И вот что происходит. В standard сессии создаем (замещаем) папку буквой диска
Из стандартной командной строки – «новый» диск виден
И в Windows Explorer тоже виден
А теперь запустем elevated command promt и Oops! А нет диска Т, как будто ничего не делали
Может сделать наоборот? Выполнить SUBST в elevated сессии?
Запускаем Windows Explorer и … нет такой буквы
Запускаем стандартную командную строку … снова нет
Ничего не напоминает? А мне напомнило. Точно также «не видны» сетевые шары подключенные командой NET USE как было описано в статье https://winitpro.ru/index.php/2015/03/11/nework-disk-access-from-elevated-programs/
И там было решение. Здесь, по идее, тоже должно быть, подумалось мне. Далее была пара часов и экспериментов и вот что получается. Выхода стандартного нет. Рекомендаций нет. Но «костыли» забить можно.
Итак, по порядку.
Метод 1: «Метод» Microsoft
«Метод» Microsoft – это я так это решение назвал. Оно заключается в предложении … Отключите UAC!
Ну совсем костыль, на безопасность наплевали, но зато работает 🙂
- Отключите UAC через Control Panel
Измените значение ключа с «1» на «0»
Метод 2: Подсмотрено в сети
Один из вариантов, до которых додумались в сети. Запустить SUBST два раза. В простой и elevated сессиях
Метод 3: «Голь на выдумки хитра»
Этот метод мой собственный Напоминает старый анекдот «А у нас гланды удаляют. Автогеном. Через задний проход»
В чем суть. Используется не SUBST, а NET USE
- Расшариваем на этом же компьютере нужную папку
- Подключаем ее как сетевой диск командой NET USE
- Не забываем добавить в реестр ключик из статьи https://winitpro.ru/index.php/2015/03/11/nework-disk-access-from-elevated-programs/
- Наслаждаемся жизнь.
Метод 4: Подсмотрено в сети (itpro)
Вбиваем «костыль» в реестр
reg add «HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices» /v Z: /t REG_SZ /d «\??\C:\DirectoryName» /f
- Z: – нужная вам буква диска
- C:\DirectoryName –необходимая вам пака, соответсвенно
- Данная команда проходит только из elevated (запущенной от имени Администратора) сессии
- Не забываем перегрузиться.
Проверено — работает. Диск появляется в системе, как после команды SUBST, с той лишь разницей, что его видно из всех сессий
И из Windows Explorer
На каком из методов остановиться – решать вам.
Как создать виртуальный диск из папки в Windows 10.
Публикация: 2 Декабрь 2019 Обновлено: 2 Декабрь 2019
Одной из особенностей Windows 10 является возможность создания виртуального диска из папки. Это добавляет новый жесткий диск в папку «Этот компьютер». При открытии диска в Проводнике будет показано содержимое исходной папки.
Создать диск из папки можно сделать с помощью встроенной команды subst. Она связывает путь с буквой диска. При использовании команды без параметров subst отображает буквы виртуальных дисков, которые вы уже создали с помощью инструмента.
Инструмент subst не является эксклюзивной функцией Windows 10. Он был впервые представлен в DOS и включен в каждую версию Windows. Диски, созданные с использованием subst, остаются доступными во время сеанса пользователя или до тех пор, пока вы не отключите виртуальный диск вручную. Перезапуск, выключение компьютера или выход из учетной записи пользователя приведет к полному отключению виртуальных дисков, и вам потребуется заново создать их, чтобы использовать их снова.
Чтобы создать виртуальный диск из папки в Windows 10,
Шаг 1: Откройте новый экземпляр командной строки или PowerShell от имени Администратора.
Шаг 2: Введите следующую команду: subst path\путь\к папке
Шаг 3: Замените часть буквой, которую вы хотите назначить виртуальному диску. Буква не должна использоваться никаким реальным или виртуальным диском, включая съемные устройства, подключенные к вашему ПК.
Шаг 4: Замените путь к папке \путь\к папке полным путем к исходной папке, которую вы хотите смонтировать как диск, я использую папку Files которая находится на диске D.
Шаг 5: Теперь откройте проводник и откройте папку «Этот компьютер». Вы увидите новый диск там.
С помощью subst вы можете быстро найти виртуальные диски, доступные в текущем сеансе пользователя.
Найти виртуальные диски, созданные с помощью Subst.
Шаг 1: Откройте новую командную строку.
Шаг 2: Введите subst без параметров и нажмите клавишу Enter .
В выводе вы увидите список виртуальных дисков, созданных с помощью subst.
Все!
Как удалить диск, созданный с помощью subst.
Шаг 1: Откройте новую командную строку.
Шаг 2: Введите следующую команду: subst /D
Замените часть фактической буквой виртуального диска, который вы хотите удалить.
Шаг 3: Нажмите клавишу Enter . Диск удален.
Совет: Windows 10 можно подключить к виртуальному диску каждый раз, когда вы входите в свою учетную запись. Это может быть полезно, если у вас есть программное обеспечение, которое ищет файлы в некоем жестком месте, которое недоступно на вашем ПК. Вот как.
Создание виртуального диска с Subst при запуске Windows 10
Шаг 1: Создайте новый .BAT файл со следующим содержимым: @subst F: d:\Data\Files
Шаг 2: Исправьте букву диска и путь к папке в соответствии с вашими требованиями.
Шаг 3: Нажмите Win + R , чтобы открыть диалоговое окно «Выполнить».
Шаг 4: Введите следующие командe: shell:Startup
Шаг 5: Это откроет папку автозагрузки. Переместите созданный пакетный файл туда.
Каждый раз, когда вы входите в Windows 10, Будет создан виртуальный диск из указанной папки и назначена ему соответствующая буква диска.
Как добавить команду «Создать диск из папки» в контекстное меню Проводника
Шаг 1: Откройте текстовый редактор «Блокнот»
Шаг 2: Скопируйте и вставьте в него следующие строки:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Mount R\command]
@=»subst r: \»%1\»»
Шаг 3: Сохраните его с расширением *.reg
Шаг 4: Запустите созданный файл выполнив слияние, подтвердите запрос системы на внесение изменений в реестр. Все, Теперь откройте проводник кликните правой кнопкой мыши на папку из которой будет создан виртуальный диск и выберите в контекстном меню «Mount R».
Перейдите в «Этот компьютер» Здесь вы найдете созданный диск. Все!
Windows 10 issue «Subst» command doesn’t work
Original Title: Windows 10, Subst
If I use the subst command to map alocation to letter, the letter does not appear in Win Explorer
Replies (45)
* Please try a lower page number.
* Please enter only numbers.
* Please try a lower page number.
* Please enter only numbers.
Thank you for posting your query on Microsoft Community.
Since this command may run under both elevated and non-elevated privileges. I would suggest you do a SFC Scan and see if everything is working properly in your system.
Follow the steps to run the System File Checker
- On the Search bar type “cmd” and click ctrl + shift + Enter to open the Elevated Command Prompt. (If prompted for a password, type the password and click Allow)
- Type “sfc /scannow” and hit Enter.
- Exit Command Prompt.
For more information about SFC Scan click on the link below:
Now run the command again and see if it helps.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
I use the psubst command to create persistent virtual disks that make disks on other computers in the network appear to be on this computer. It worked fine in Windows 7 & 8, but only partially in Windows 10. The virtual disks appear in Windows Explorer, but only some programs can see them. e.g. ultraEdit, PolyView, Word, etc. Other programs such as foobar2000 and TextPad cannot. For foobar, they are still in the list of disks to be monitored, but an error is reported and I cannot play any of the files on them. When I remove them from the monitored list and try to add them back, they do not appear on the list of disks in the Add Disks dialogue. Similarly when I try to open a text file on one of the virtual disks in TextPad, the virtual disks do not appear the the Open File dialogue.
Also the administrator command line cannot see the virtual disks.
I have run sfc/scannow and it reports no errors.
7 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
1. You must run subst in the admin command prompt.
2. The programs that do not see the virtual disks will see them if you run them as an administrator.
3. I have not found any way to run windows explorer as an administrator. I use another file manager that I can run as administrator.
4. If you want to run subst in a batch file at startup, you have to find a way to run it in the admin command prompt. One way is to put this code fragment at the head of your batch file:
@echo off
:: BatchGotAdmin (Run as Admin code starts)
REM —> Check for permissions
>nul 2>&1 «%SYSTEMROOT%\system32\cacls.exe» «%SYSTEMROOT%\system32\config\system»
REM —> If error flag set, we do not have admin.
if ‘%errorlevel%’ NEQ ‘0’ (
echo Requesting administrative privileges.
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^(«Shell.Application»^) > «%temp%\getadmin.vbs»
echo UAC.ShellExecute «%
s0″, «», «», «runas», 1 >> «%temp%\getadmin.vbs»
«%temp%\getadmin.vbs»
exit /B
:gotAdmin
if exist «%temp%\getadmin.vbs» ( del «%temp%\getadmin.vbs» )
pushd «%CD%»
CD /D «%
dp0″
:: BatchGotAdmin (Run as Admin code ends)
:: Your codes should start from the following line
5 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
For some reason, subst seems to be broken. I have two machines that I did a fresh install of Windows 10 Pro on and subst «works» in that a new drive letter is available in the command prompt but the drive letter does not show up in Explorer, even when I run the subst from an elevated command prompt. I don’t know about Windows 8 but in Windows 7 and before, the subst drive letter would appear in Explorer.
This idea about running » sfc /scannow» is nonsense. This is some of the standard advice Microsoft Support Engineers give when they don’t know the answer. Whenever an MS Support person tells you to run «sfc», it should be read as, «I don’t know but I have to reply».
197 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Tom read my previous posting again. You can’t see the virtual disks in Windows Explorer because it does not seem that you can run it as an administrator. If you use another file manager such as Magellan and run it as an administrator, you will see the disk. Some programs can see the disk in normal mode, but others must be run as an administrator to see them. This is in addition to running subst in the administrator command prompt.
You are are correct; this is new in Windows 10.
1 person found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
1. You must run subst in the admin command prompt.
2. The programs that do not see the virtual disks will see them if you run them as an administrator.
3. I have not found any way to run windows explorer as an administrator. I use another file manager that I can run as administrator.
4. If you want to run subst in a batch file at startup, you have to find a way to run it in the admin command prompt. One way is to put this code fragment at the head of your batch file:
@echo off
:: BatchGotAdmin (Run as Admin code starts)
REM —> Check for permissions
>nul 2>&1 «%SYSTEMROOT%\system32\cacls.exe» «%SYSTEMROOT%\system32\config\system»
REM —> If error flag set, we do not have admin.
if ‘%errorlevel%’ NEQ ‘0’ (
echo Requesting administrative privileges.
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^(«Shell.Application»^) > «%temp%\getadmin.vbs»
echo UAC.ShellExecute «%
s0″, «», «», «runas», 1 >> «%temp%\getadmin.vbs»
«%temp%\getadmin.vbs»
exit /B
:gotAdmin
if exist «%temp%\getadmin.vbs» ( del «%temp%\getadmin.vbs» )
pushd «%CD%»
CD /D «%
dp0″
:: BatchGotAdmin (Run as Admin code ends)
:: Your codes should start from the following line
If I manually run cmd as administrator and launch my autoexec.bat file from that folder, my apps see the drive substitution.
Trying to get this code to set Admin privilege automatically for the cmd prompt, in the Autoexec.bat in the startup folder — does not work.
Very frustrating that we are forced to jump through hoops with diminished functionality with each upgrade. It’s like having our hands and feet tied behind our back and attempt to do our jobs.
1 person found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Mike, what do you mean by «does not work.»?
I do not run my bat commands in autoexec.bat, but in a separate bat file in the startup folder. It therefore runs quite late in the boot process—when programs are being run. It could be that autoexec.bat is run earlier, before all this administrator **** is set up.
1 person found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
For some reason, subst seems to be broken. I have two machines that I did a fresh install of Windows 10 Pro on and subst «works» in that a new drive letter is available in the command prompt but the drive letter does not show up in Explorer, even when I run the subst from an elevated command prompt. I don’t know about Windows 8 but in Windows 7 and before, the subst drive letter would appear in Explorer.
This idea about running » sfc /scannow» is nonsense. This is some of the standard advice Microsoft Support Engineers give when they don’t know the answer. Whenever an MS Support person tells you to run «sfc», it should be read as, «I don’t know but I have to reply».
Tom: I’ve been successful in seeing the substituted path in Windows Explorer after running the Subst command within a CMD window that is run as Administrator. I even see it appear in Explorer when not run as Administrator but many of my applications, e.g. Tradestation, do not see the Substitution.
My problem is, running CMD as Administrator in a batch file to make the Subst more permanent on bootup. Answers back from Microsoft are truly void of merit. Most of the techs, born long after, haven’t a clue regarding batch files. The fact that they respond anyway is a policy that needs to be replaced by their technical administrators. Otherwise, Windows 10 follows the same degraded path of Vista.
1 person found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Leonard: I am running the Subst in an Autoexec.bat placed in the Startup folder. I’ve been doing this for years and have never had issue with the Subst command running within the Autoexec.bat — except for the path being truncated (e.g. Subst Y: d:\dropbox\trades
1). The actual path is d:\dropbox\tradestation backups\
Windows 10 has a couple issues introduced with batch files:
1) No longer recognizes the truncated path name (prior Windows OSs couldn’t recognize full name in the path — go figure). Even with the full pathname as shown above, now, Windows 10 does not recognize spaces in the path name. I’ve replaced the space with an underscore and it now recognizes the pathname (pain in the rump) but now has the issue with Subst needing to be run as Administrator in batch file.
2) I can see the Substituted path in Windows Explorer but not in my critical applications (e.g. Tradestation). When I run Subst manually from within an elevated CMD window, Tradestation sees the Substitution. I’ve tried the code for elevating CMD in a batch file — see below — but that does not work. I commend the response below with regard to the code for elevating CMD in a batch file but would really appreciate these suggestions being tested before being proffered herein and we, desperate to get things working that should not be broken, spend inordinate amounts of time trying to fit a square peg into a round hole.
Calling Microsoft, I’m told I cannot get support unless I pay. Pay for something that their programmers broke? Precious!
I should also mention, that I did get patched through (twice in fact) to Microsoft Tech Support in the Phillipines (during normal business hours — 11am EST). The techs, very obviously born long after batch files were implemented in Windows OSs, offered advice that had nothing to do with the issue — even after explaining the problem at least three times. After wasting 45 minutes, they (two reps) shared that I can speak with somebody that knows batch files if I’d like to pay a fee. Hmmm. extortion at its finest.
Considering that Microsoft has a lot of ground to make up, might be a good idea to find a way to prenvent more IT folks jumping ship to the Apple platform. Charging for something Microsoft developers broke in the OS is not the solution.