#4464 Cannot see or access SUBST'd drive

5.5.x
open
nobody
None
5
2013-09-03
2013-08-31
Steve Valliere
No

Just installed Notepad++ 6.4.5 (UNICODE) Build time : Aug 9 2013 - 17:33:38 on my Windows 7 Pro x64 machine. Microsoft/Windows Update shows no updates available, so I think I am current, as of today.

I use a SUBST'd drive when I work on projects I brought home from work so that all of the project references match. Notepad++ says that the SUBST'd drive does not exist. If I copy the fully qualified file name that NPP says does not exist into the File Open box for Windows Notepad (or anything else) then the file opens up fine. (I've also noticed that the drive/folder listings for the Default and Custom Backup directories also refuse to admit the existence of a SUBST'd drive, and since they use a different interface that the File Open dialog, this appears to be an INTENTIONALLY CREATED issue.)

Not sure WHY NPP is singling out SUBST'd drives for exclusion, but IMHO it is a BAD thing to do. Is there any hope that it will be fixed?

Discussion

  • No application programmer wants to add code which deals with SUBST'd drives (either to exclude them or to include them) if it can be avoided. The entire point of SUBST'd drives is to let applications live in a fictional world where those drives are as valid as physical drives.

    Seeing as the open file dialog and the directories dialog in Custom Backup are standard components from Microsoft, and the SUBST'd drive isn't showing up there, this is probably not N++'s fault.

    Could this have something do with the user you used to create the mapping?

    http://social.technet.microsoft.com/Forums/windows/en-US/3d13d9ce-1548-45e4-8873-bad3869d6cd2/problem-with-subst-bug-or-feature

    When you create a drive mapping with SUBST, that mapping takes place in the context of the user account used to run the command. If you create a drive mapping as a regular user and try to access it with elevated privileges, the elevated-privilege process won't "see" the drive mapping.

     
    Last edit: Andreas Jonsson 2013-09-01
  • Steve Valliere
    Steve Valliere
    2013-09-03

    I think it might have been a result of allowing the install/update program to execute N++ for me, since that execution was apparently under a different context than my normal login. When I exited and restarted N++ using my own account, the SUBST drives appeared. To test my theory, I tried right-clicking N++ and choosing 'Run as Administrator' and, sure enough, the SUBST drives no longer existed under that context.

    I apologize for the incorrect report, though it might be wise for the installer/updater to ensure it runs N++ under the USER'S context instead of the ADMIN context that was required to install under Win7 (and probably other versions of Windows as well.) I don't think it is right to have the user editing as ADMIN without at least letting him KNOW that is what he is doing!

    Thanks for the comment!