PDA

View Full Version : Mapped drives and UAC



NewsArchive
08-14-2015, 06:28 AM
User Account Control (UAC) is a technology and security infrastructure
introduced with Microsoft's Windows Vista and Windows Server 2008 operating
systems eight years ago in 2007. And of course, UAC is a fundamental part
of Windows 10. But mapped drives (in user context) is still a frequently
asked question.

Mapped drives are ALWAYS associated with a logon session, not a machine! A
locally unique identifier (LUID) identifies a logon session and a LUID is
generated for each logon session. Because mapped drives are associated with
LUID, and elevated applications are using a different LUID generated during
a separate login event, the elevated application will no longer see any
mapped drives for this user. The elevated and non-elevated administrator
accounts have completely different logon tokens and can therefore have
different drive mappings. That means, a process running non-elevated (e.g.
your own application) and another process running elevated are a part of two
distinct logon sessions. As such, if a drive was mapped in a non-elevated
context (e.g. using Explorer), it will never be visible to an elevated
context (e.g. "per-machine" setup.exe), unless the drive is also mapped in
the elevated context.

To cut a long story short: applications running under a different user token
(elevated and non-elevated) have a totally different set of mapped drives!

Hope that helps a bit.

--
Friedrich Linder
Lindersoft | SetupBuilder | www.lindersoft.com
954.252.3910 (within US) | +1.954.252.3910 (outside US)

--SetupBuilder "point. click. ship"
--Helping You Build Better Installations
--Create Windows 10 ready installations in minutes
--Official COMODO Code Signing and SSL Certificate Partner

NewsArchive
08-18-2015, 02:20 AM
Hi Friedrich,

> distinct logon sessions. As such, if a drive was mapped in a non-elevated
> context (e.g. using Explorer), it will never be visible to an elevated
> context (e.g. "per-machine" setup.exe), unless the drive is also mapped in
> the elevated context.
>
> To cut a long story short: applications running under a different user token
> (elevated and non-elevated) have a totally different set of mapped drives!

If I run Total Commander, one instance elevated, the other one not, they
both show the same mapped drives (Win8.1) Does this ONLY apply if the
user accounts are different or should it also apply when running
elevated vs. non-elevated like with TC?

I do not remember if I did the mapping in an elevated instance of TC or
not - that was last year - I don't remember what I had for breakfast!
Oh, wait, I forgot breakfast!!!<g>

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
08-18-2015, 02:21 AM
Arnor,

Same user accounts.

Easiest would be to open two command prompts.
One regular
One run-as-administrator

Type NET USE at each.

That will show what's mapped in each context.

Unless TC has some magic, I'd guess it matches what you'll see at the two
prompts.

First attached pic (win7) - blue window is as-administrator, black window is
non-elevated. Same login. Different mappings.

Behavior hasn't changed. Similar pics attached for 8.1 and 10.
You'll note that whoami displays the same login in each pair of windows.

jf

NewsArchive
08-18-2015, 02:26 AM
Hi Jane,

> Type NET USE at each.
>
> That will show what's mapped in each context.
>
> Unless TC has some magic, I'd guess it matches what you'll see at the two
> prompts.

As far as I can tell, mine are 100% identical. See
http://screencast.com/t/9orK48FyRjf

Left is not elevated, the one of the right is elevated. I just mapped a
drive (Y:) using Explorer and it shows up identical in both non-elevated
cmd and elevated (see: http://screencast.com/t/1Ksn3iihz) This is win8.1.

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
08-18-2015, 08:26 AM
I wonder if it has something to do with this

https://support.microsoft.com/en-us/kb/3035277

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
08-18-2015, 11:29 AM
Hi Jeff,

> I wonder if it has something to do with this
>
> https://support.microsoft.com/en-us/kb/3035277

Don't know. I have been using mapped drives with UAC since Vista and
never run into this issue. Some software I use runs elevated and I have
never seen any difference in drive mapping in elevated vs. non-elevated
programs.

Best regards,

--
Arnor Baldvinsson - Icetips Alta LLC