Please help me understand SUBST behavior in Win8/64

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Please help me understand SUBST behavior in Win8/64

Post by *JohnFredC »

I am baffled. :oops:

On my XP32 system, a command-line SUBST commands assigns drive letters to folders. All apps see those drives.

On my Win8/64 system, the SUBST command also successfully assigns drive letters to folders. But not all applications can see those drives!
  • • Applications that Can see Win8/64 SUBST drives:
    Explorer, Office, XnView, FreeCommander, SpeedCommander, Delphi, Firefox, Rhinoceros, Audacity, several others
  • • Applications that CanNOT see Win8/64 SUBST drives:
    TC32(!), TC64(!), Lazarus, Zoner (and a few others I forget)
Furthermore, applications in the second category (including TC) cannot see a network drive I mapped to a drive letter using Explorer. Since TC is my "main man", this very distressing.

My user account is an administrator account. I have tried running the offending applications "as administrator" but to no avail. A couple of "visual" SUBST tools I found on the web show all of the drives properly mapped.

So, what should I try next? Could it be something to do with where the substitutions are placed in the Win64 registry and where the offending applications (including TC) look for them?

Thanks in advance for any help offered!
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Maybe you start TC in elevated mode and Lazarus, Zoner etc you start from TC so they are elevated too?
Explorer and all apps that you start from it are NOT elevated be default. Windows UAC doesn't allow to see mapped drives between elevated and non-elevated applications. And it is so since Windows Vista.
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Hi MVV

Thanks for your fast response. I figured it might be something associated with elevation, but unfortunately no apps (including TC) start in elevated mode. Whether I start them from within TC or from the desktop shortcuts or from Explorer makes no difference.

I never run anything "as administrator".

Besides, it is just a few apps (such as TC) that can't see the drives. The majority of my applications work properly.

That did give me an idea, though. I'll create a new "not administrator" account and see what happens.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Try to map a drive from command line and then start TC from that command line. It should have same permissions and should see your drive.
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

OK... apparently TC only sees SUBST drives that have been created inside an elevated command prompt.

I must be missing something conceptually. Does TC start in elevated mode automatically since I'm signed as administrator?


Thanks again.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

If UAC is enabled, by default programs started in user mode (non-elevated, with restricted permissions). Only when you require to start it elevated (or if it is started by elevated application) it started in admin mode.

TC shows special prefix USERNAME^ in its title when it is started in elevated mode. CMD also uses prefix Administrator: in its title.

You can try to run XnView, FreeCommander, SpeedCommander etc. in elevated mode (via context menu item 'As Administrator') to check if they will see drives created in elevated and non-elevated command prompt.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Check the link by which you start TC, it may have enabled "Run as administrator" in the "Compatibility" section.
Author of Total Commander
https://www.ghisler.com
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Check the link by which you start TC, it may have enabled "Run as administrator" in the "Compatibility" section.
Thank you! That did it for TC! Not sure why it was set to start with admin, and only for me (not all users), 'cause I don't remember messing with it.

The other applications that can't see the SUBST drives (Lazarus, for instance) are not running elevated.


Anyway... thank you!
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's possible that Windows set this when you used some older version of TC.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Anyway, UAC question that popups every time when TC is started is the sign that it will be started elevated. :)
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

I have UAC set to the lowest option.

To my way of thinking, the SUBST "visibility" issue reported here is backwards from what I would have expected. IMO elevated processes should see a "cumulative" (all inclusive) view of the environment.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7025
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

JohnFredC wrote:I have UAC set to the lowest option.

To my way of thinking, the SUBST "visibility" issue reported here is backwards from what I would have expected. IMO elevated processes should see a "cumulative" (all inclusive) view of the environment.
Relevant is here only the way of Microsofts thinking
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Holger!

At this link (a few spots down the page in the link you posted) is a really excellent discussion of this very topic.

Thank you!
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
Post Reply