Reply to Thread

Post a reply to the thread: Mapped Drive problem (again)

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 06-25-2013, 07:43 AM
    linder

    Re: Mapped Drive problem (again)



    Friedrich
  • 06-25-2013, 07:39 AM
    Chris

    Re: Mapped Drive problem (again)

    Perfect. Thank you.
  • 06-25-2013, 05:57 AM
    linder

    Re: Mapped Drive problem (again)

    Hi Chris,

    sorry for the confusion. Yes, your users can map the drive non-elevated and elevated.

    For example, on Windows 7, they click the Start button and in the "Search programs and files" field they enter 'command prompt'. Search will bring up the "Command Prompt" program. Your users right-click the Command Prompt item and select "Run as administrator".

    The following will then create a mapped H: drive letter:

    net use H: \\server\share /persistent:yes

    As a result, non-elevated running applications can see and use all drives that have been mapped in a non-elevated context and elevated running apps (e.g. setup.exe or your own application started with administrator execution level privileges) can see and use the drives that have been mapped in an elevated context.

    Friedrich
  • 06-25-2013, 05:46 AM
    Chris

    Re: Mapped Drive problem (again)

    Thank you so much Friedrich,

    And.. (sorry): just to be certain:

    When you say "No problem",
    do you mean "Yes this will work, and will solve the problem" ?
  • 06-25-2013, 05:19 AM
    linder

    Re: Mapped Drive problem (again)

    Yes, absolutely no problem. Different users have different user settings, like printers, mapped network drives and so on. So if there are different accounts on one machine (JoeUser, BillyIdol, etc.) then they all have completely different user settings. If JoeUser has mapped a drive (non-elevated) then it's not visible in the BillyIdol account. But if a drive was mapped elevated then an elevated running application can "see" that drive mapping from all current and future accounts.

    Your customers only have to launch, say, the command prompt elevated ("run as administrator") and then enter something like:

    net use H: \\server\share /persistent:yes

    This will then map the drive in an elevated context.

    Friedrich
  • 06-25-2013, 04:52 AM
    Chris

    Re: Mapped Drive problem (again)

    Would this work??

    Get the user to map the shared folder twice:
    eg. Log on as normal user and map as drive G.
    And when elevated, map a drive H.

    That way both the installer and the app should see the shared folder, (though they would see different drive letters -- which doesn't matter to me :-) ??


    (I am only asking about MY users, who often have just 2 or 3 PCs, and only my software and maybe MS Office (and email/browser/etc). ie. a very simple small system)
  • 06-25-2013, 03:11 AM
    linder

    Re: Mapped Drive problem (again)

    You are welcome

    Friedrich
  • 06-25-2013, 03:04 AM
    Chris

    Re: Mapped Drive problem (again)

    Thank you so much for the excellent reply. Things are now much clearer.
  • 06-25-2013, 12:59 AM
    linder

    Re: Mapped Drive problem (again)

    BTW, you can also programmatically handle the "resolution" descried in the above Microsoft link from your install (after you prompted the user "Would you like to do this Yes/No"), including a system reboot. However, it is NOT RECOMMENDED and VERY BAD PRACTICE -- but you can do it with SetupBuilder if you want <g>. Again, NOT RECOMMENDED AT ALL

    Friedrich
  • 06-25-2013, 12:54 AM
    linder

    Re: Mapped Drive problem (again)

    Chris,

    "Elevated" means to gain all rights not enabled due to UAC. And elevated running application has access to all protected system resources.

    By default, an installation always requests administrator execution level privileges to install your application "machine-wide", so all current and future users of the computer system can use your program. You can also do "per-user" installations (General Information -> UAC Execution Level -> asInvoker option), but then you do NOT have access to any protected Windows area (e.g. "Program Files" folder tree, the Windows folder tree, HKEY_LOCAL_MACHINE registry, you can't register .OCX or Fonts, etc.). 99% of all applications make use of the per-machine install method.

    I assume that your own application is fully UAC-aware and mixed-mode compatible (runs elevated and non-elevated). By default, your application (asInvoker manifested) should run non-elevated. But it should also work fine when the user starts it elevated ("Run as administrator"). In this case, a completely different user profile will be accessed.

    BTW, you do not have control over the UAC status (enabled or disabled). NEVER EVER suggest to turn UAC off. This will open a very large security hole and their lawyers might come looking for you <g>

    So the only resolution is this:

    http://technet.microsoft.com/en-us/l...(v=ws.10).aspx

    Or provide an option from your own install to map a drive ("Map/Disconnect Network drive..." script function).

    Friedrich
This thread has more than 10 replies. Click here to review the whole thread.

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •