4

When I try to expand a network drive from the 'Browse' button on the 'Select Destination Location' setup page I get a 'refers to a location that is not available' error (see first screenshot), the network drive icons don't display either.

The network drive permissions allow all users read/write drive access and other apps do not have the same problem (the dialog in the second screenshot was generated by a 32-bit app calling the SHBrowseForFolder API).

The environment is Windows 8 (64-bit) with all updates as of 16-Jul-2013 running as a VirtualBox 4.2.16 client. The setup has been compiled with the latest version of Inno Setup (5.5.3 (a)).

The problem is exhibited by both Samba and Windows shares. Windows 7 and XP do not have the same problem. I haven't tested it on a dedicated (non VirtualBox) Win8 PC.

Any help would be greatly appreciated.

Screenshot 1

Screenshot 2

Stuart Rackham
  • 900
  • 9
  • 17
  • 2
    Just out of curiosity, ANSI version of InnoSetup is being compiled with Delphi 2.01, which was released in 1997 (16 years ago). As first I would suggest at least *upgrade* to Unicode version of InnoSetup (even if that probably won't resolve this problem). – TLama Jul 15 '13 at 23:48
  • Thanks for the tip, I recompiled with the Unicode version (5.5.3 (u)) but still get the same error. – Stuart Rackham Jul 16 '13 at 03:24
  • 2
    By default Windows does not cache login credentials between elevated and non-elevated processes. You logged into the server and mapped the drive letter as a non-elevated user; this is not available to an elevated process such as an installer. – Miral Jul 17 '13 at 22:01
  • That's the answer, many thanks! Setting [Setup] PrivilegesRequired=lowest fixed it. Interesting that it only happens on Win8. – Stuart Rackham Jul 19 '13 at 01:18
  • @Miral Stuart said that your suggestion solved his problem, so would you please post it as a formal answer to the question? If Miral doesn't respond in a few days, you could do this yourself, Stuart (answering one's own question is encouraged here) so that you would be able to accept an answer and mark this question resolved. – Cody Gray - on strike Aug 03 '13 at 12:16

2 Answers2

2

By default Windows does not cache login credentials between elevated and non-elevated processes. You logged into the server and mapped the drive letter as a non-elevated user; this is not available to an elevated process such as an installer.

You can set PrivilegesRequired=lowest in the [Setup] section to prevent elevation and keep network drives available; however bear in mind that doing this will also prevent access to any admin-required locations or functionality on the local machine.

If you are creating a "pure" network installer (that does not install any local files), you may also wish to use settings like Uninstallable=no. Alternatively, you could redesign your installer to run locally on the server machine instead.

Miral
  • 12,637
  • 4
  • 53
  • 93
1

This problem annoyed me to for quite a while as well, until I found an easy solution:

In the registry just set [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "EnableLinkedConnections"=dword:00000001

reboot, and be done with it.

Over the background and possible drawbacks read here and here

When it comes to Inno Setup, one can also follow this approach: Make Inno Setup installer request privileges elevation only when needed. Esp. when one does not want to ask customers to change this registry key. I am doing it like that and it works quite fine.

Community
  • 1
  • 1
ChrisFor
  • 21
  • 3