cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Peter_Kosenko
Level 7

Mapped Drives with UAC

I have a Basic MSI installer that runs with elevated privileges (the included manifest is "higest available"). In one setup configuration we need the user to select the location of the program on a network in order to create a shortcut to it. This works fine on XP. But on Vista the user no longer is able to see his/her mapped drives in the selection dialog after privileges have been elevated. We have discovered that this is because the two states of UAC (standard and elevated) of the SAME profile do not apparently SHARE mapped drives. The only way that we can get the visibility of the mapped drives back is to turn off UAC to run the installer (which requires reboot, run the installer, then reset UAC and reboot).

I have no hope for a solution. We need elevated privileges in the installer. On the other hand, we need the user to see their own mapped drives (which elevated UAC is prventing). Bad Microsoft design.

Is there a way to UNELEVATE privileges temporarily in the installer? I can see how you elevate them (at the beginning and with the shield button). But is there a programmatic way to temporarily unelevate them and then reelevate them automatically? I see no such information in the InstallShield help.
Labels (1)
0 Kudos
1 Reply
setupcoder
Level 4

It sounds like your installer is packaged as a setup.exe. Perhaps it might be possible to have the setup.exe itself not request elevation and instead mark the .msi as requiring administrative privileges.

This would involve setting "Required Execution Level" to Invoker in the Release properties for the Setup.exe and setting "Require Administrative Privileges" to Yes in the Summary Information Stream area of the General Information view.

This way the UI sequence, where your installer is presumably displaying the selection dialog for mapped drives, runs unelevated, while the user would be prompted later for elevation for the execution sequence.
0 Kudos