Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a local folder, X:\Source\Q_Project that I want to map to the Q: drive letter. I use a shortcut that points to a batch file for this. The batch file is:

@echo off
subst q: /d
subst q: X:\Source\Q_Project

This worked just fine in Windows 7 Ultimate 64-bit - I was able to see the Q: drive from Windows Explorer and from any other 32/64-bit program, including the console, etc.

Under Windows 8 Home 64-bit, this no longer works. I have UAC off (only through the UI so it's not really, really off but warnings are off anyway). The shortcut is set to run as administrator under the Properties->Shortcut tab.

When I double-click the shortcut, the batch file executes and the Q: drive is visible from one particular program, Far Manager (32-bit console application, running as administrator). If I launch a process through Far Manager, that process also sees the Q: drive. Anything that I try to launch through File Explorer or other desktop shortcuts don't see the subst'd drive. If I run a shortcut with Run as administrator, those programs will see the Q: drive.

This is driving me crazy - is there a way to fix this in this sorry excuse of an OS? Windows 7 worked perfectly with this (I was running as an actual admin under Windows 7 but under Windows 8 I'm trying to see if it's possible to do it 'right' - so far this seems to fail, I keep having to run everything as an admin).

Is the only option to truly turn off UAC and run as an actual admin? I know it'll kill all Metro apps but that's fine by me.

Note: a permanent mapping through the registry won't work for me (I have one of those, too). I need to be able to re-map the Q: drive frequently to different source code repositories without having to log off / restart.

share|improve this question
what you are seeing is no different than 7 or even Vista -- when you run something "As administrator" then it runs in the Administrator's context, and not the user's. Anyhow, what's the ACTUAL problem you're trying to solve? Why not just map/subst Q: as the current user? – Ƭᴇcʜιᴇ007 Jul 2 '13 at 17:51
With UAC on you get 2 contexts, the filtered standard user and the elevated user. The subst command is only effective for the context it was issued in. You would need to run the subst as standard user. What is the reason you run the shortcut as administrator? – David Marshall Jul 2 '13 at 17:53
@DavidMarshall I need that because most of my programs need to run as administrator - Visual Studio, Far Manager, etc. I try to run as few programs as admin as I can but that only applies to Office programs. I'm an engineer and most of my programs need to run as admin. – xxbbcc Jul 2 '13 at 17:56
@techie - I need to access my Q: drive from both the standard and the elevated processes. It seems like the only solution is to truly nuke UAC through the registry. – xxbbcc Jul 2 '13 at 17:57
Or subst it twice, once for the user context you're using, and once for the administrator user's context. PS: I run VS in regular user mode all the time - helps you from making programs that require Admin privileges without realizing it. ;) Perhaps you should consider changing your processes instead of trying to circumvent OS security. – Ƭᴇcʜιᴇ007 Jul 2 '13 at 18:02

If you want to "map" the folders with subst and use an "administrator instance" of a program, you must do the "subst" as administrator too. Easy ;)

Right clic on your ShortCut and clic on "Run as Admin..."

share|improve this answer
Can you explain how to do this? – bwDraco Oct 2 '15 at 12:20
Right clic on your ShortCut and clic on Run as Admin... – user244257 Oct 30 '15 at 10:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .