TC 9.51 - Issue with Virtual Drives

Please report only one bug per message!

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
maxmula
Junior Member
Junior Member
Posts: 28
Joined: 2004-10-12, 12:18 UTC
Location: ITALY
Contact:

TC 9.51 - Issue with Virtual Drives

Post by *maxmula »

In my PC, I have a .bat which is launched at Windows startup and maps two directories of the main Hard Disk to virtual drives:

Code: Select all

subst d: c:\d_drive
subst u: c:\users

However, when I run TC (v.9.51), only D: (or sometimes none of the virtual drives) is shown, while Windows Explorer seems to recognize both (see attached image):
Image: https://i.postimg.cc/BZ81Trm9/TC-VDrives.png

Also, if I list the mounted virtual drives from a Shell window, they appear as expected:

Code: Select all

C_\Usesr\me>subst
D:\: => C:\d_drive
U:\: => C:\users
I'm running TC from a link on the desktop, which is set to launch it with administrator privileges.
OS is Windows 10 Pro, 64-bit; running the .bat script as Administrator doesn't seem to help.
Any idea?

Thanks in advance,
Massimo
User avatar
Dalai
Power Member
Power Member
Posts: 9682
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: TC 9.51 - Issue with Virtual Drives

Post by *Dalai »

Don't run TC as administrator and it will probably work.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: TC 9.51 - Issue with Virtual Drives

Post by *gdpr deleted 6 »

maxmula wrote: 2021-02-04, 15:32 UTC I'm running TC from a link on the desktop, which is set to launch it with administrator privileges.
OS is Windows 10 Pro, 64-bit; running the .bat script as Administrator doesn't seem to help.
Not a TC bug. That's just how Windows behaves.

You can observe the very same behvior without using TC. Open one cmd.exe as administrator, and execute your batch script with the subst commands within this cmd.exe. Open another cmd.exe as administrator, and you won't see the subst-mapped drives there either, as both cmd.exe's run isolated from each other. The same applies if you start TC as administrator and separately run the batch file as administrator.

(It would work if you start TC as admin and then execute the batch file from that TC instance. Or, alternatively, let the batch file not only execute the subst commands, but also let it start TC. Running the batch file then as administrator executes both the subst commands and TC within the same "runas" context, and the mapped drives should then also be available in TC.)
miroslav.vrlik
Junior Member
Junior Member
Posts: 21
Joined: 2006-04-12, 07:20 UTC

Re: TC 9.51 - Issue with Virtual Drives

Post by *miroslav.vrlik »

Think about making subst drives permanent, then it will work.

Save the following text file content, giving it extension ".reg" and run it :

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"D:"="\\DosDevices\\C:\\d_drive"
"U:"="\\DosDevices\\C:\\Users"
After computer restart, the drives will be present in Windows without need of subst command, and they will work with TotalCommander normally.
Post Reply