Page 1 of 1

TC 9.51 - Issue with Virtual Drives

Posted: 2021-02-04, 15:32 UTC
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

Re: TC 9.51 - Issue with Virtual Drives

Posted: 2021-02-04, 16:01 UTC
by Dalai
Don't run TC as administrator and it will probably work.

Regards
Dalai

Re: TC 9.51 - Issue with Virtual Drives

Posted: 2021-02-04, 16:34 UTC
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.)