Windows Vista Tip - EnabledLinkedConnections

On Windows Vista when you map a drive under your admin account you will find that your mapped drive is not available after you switch to your full token via a RunAs or Consent dialog. This is by design because there are actually two tokens in play here. What happens is the LSA recognized that you are admin at logon and creates two logons. The first with a "filtered" token or non-admin which is used to render your desktop and the other containing your full token to be available after consent dialogs. 

Because there are two separate logons there are separate logon ID's.  When network shares are mapped they are linked to the current logon session for the current process token. Meaning you don't have access to the network drive from the alternate logon. This can come into play with logon scripts and a number of other areas where you may require access to a network share from both tokens.

If you set the following key it will change how SMB shares are mapped. They will be mapped to a token, which means that LSA will check to see if there is a linked token associated with the user session and add the network share to that location as well. Basically all of this means that after setting this drives will be accessible from both tokens no matter which they are mapped under.

Disclaimer: This is not supported by Microsoft and was never tested. Use at your own risk.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
EnableLinkedConnections = 1 (DWord)

 

Here are some more great tips


Posted Feb 20 2007, 05:28 PM by Josh Phillips
Filed under:

Follow Me on Twitter

Did you enjoy this article? If yes, then subscribe to our RSS 2.0 feed or

Comments

thingy wrote re: Windows Vista Tip - EnabledLinkedConnections
on 02-25-2007 5:45 PM

Thankyou very much for this.  You've fixed a problem that has been annoying me ever since I started beta testing Vista mid last year.

Todd Erickson wrote re: Windows Vista Tip - EnabledLinkedConnections
on 03-08-2007 8:57 AM

This "feature" is turning out to be a huge problem for our install (we are an ISV).   Our install needs to run in elevated mode but the mapped drives are not available to the admin token and our install fails.  Do you know if Microsoft is planning to address this in the future?

Andrew wrote re: Windows Vista Tip - EnabledLinkedConnections
on 03-21-2007 3:39 PM

This registry entry worked for me. My installs need to run elevated but the mapped network drives were not available.  The issue still exists if you are a Standard User and use the runAs but if you actually login as an Administrator the Linked Token makes the drives appear as they would have in XP.

I have integrated the registry entry into my installer which performs a reboot if the destination OS is Vista.  I'm sure this will be address by Microsoft officially as this still effects even the most up to date installers.

travelling without moving wrote Group Policy Scripts can fail due to UAC
on 04-13-2007 10:32 AM

If you are starting to deploy Windows Vista you may have noticed that any user who has administrative

The Ultimate Windows Vista Tips Collection « Inexistent Man’s Blog wrote The Ultimate Windows Vista Tips Collection « Inexistent Man’s Blog
on 05-20-2007 2:26 PM
Martin’s Blog » “Elevated” Programme unter Vista haben auf einmal keine gemappten Laufwerke mehr wrote Martin’s Blog » “Elevated” Programme unter Vista haben auf einmal keine gemappten Laufwerke mehr
on 10-12-2007 10:33 AM

Pingback from  Martin’s Blog » “Elevated” Programme unter Vista haben auf einmal keine gemappten Laufwerke mehr

Windows is a registered trademark of Microsoft Corporation.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems Themed By nb development