Strange behaviour With Explorer

Discussion in 'Windows Vista General Discussion' started by Broonie, Apr 3, 2009.

  1. Broonie

    Broonie Guest

    Hi There,

    I'm running Vista SP1 in a domain. I'm logged into my PC with a domain
    admin account and we are runnig UAC. If i run explorer as "normal" I
    can see all my mapped drives properly. If I run explorer as admin
    (right-click run-as) I can no longer see my home drive (which is
    mapped to a network share) and my other mapped drives (which are done
    through a logon script) show as disconnected.

    Also when I'm using other apps, for example Security Templates tool,
    and I want to browse to a location to locate files or folders, the
    drives I get are the ones I see when I run explorer as admin i.e. i
    can't see my home drive.

    Anyone got any ideas.
     
    Broonie, Apr 3, 2009
    #1
    1. Advertisements

  2. Hi Broonie

    Although this behaviour can be frustrating, I believe it is "by design".

    Mapped drives are specific to the User context. For example, If you map
    a drive as "User 1", then log in again as "User 2", you won't see the
    same mapped drives that User 1 defined, you need to map them again as
    User 2.

    In the "Run as Admin" case, you understandably *think* you are running
    as the same user, just with elevated privileges. But those elevated
    privileges come in the form of a new and different user token. So, the
    MPR and WNet modules consider that you are a different user when you run
    "as administrator" - because you have a different user token - and give
    you a new, unique set of drive mappings: initially empty, if you haven't
    defined any mapped drives "as administrator".

    The easy part of the solution is to map the drives you need, while in
    the context of running "as administrator". The tricky part is that
    Windows Explorer can only run a single instance in a session; so you
    cannot use the Explorer "Tools, Map Network Drive" option to map the
    drives - Explorer will still be seeing your user context as a
    un-elevated user. The slightly clunky workaround is to open a Command
    Prompt "as administrator" and map the drives at the command line, using
    a "NET USE" command. The drives mapped this way should be visible to
    other processes which you are running "as administrator", even if they
    don't show up in Explorer.

    This behaviour is unintuitive, non-obvious and kind of annoying. But,
    that's how it works :)

    Hope this helps a bit,

    Andrew
     
    Andrew McLaren, Apr 4, 2009
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.