Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Mapped Drives problems with Vista UAC

2 replies to this topic


  • Full Members
  • 1 posts

Posted 08 March 2007 - 20:27

Our application is a client-server application with program files on each of the client machines and data (and some shared files) on a different "data server" machine. Traditionally a folder on the "data server" has been shared and each of the clients map this share as a mapped drive. The "Start In" folder on the shortcut for our program is set to this mapped drive.
This causes problems with Vista UAC. When an administrator logins into Vista, they get two security tokens. The regular user token includes their mapped drives but the admin user token does not. (see http://blogs.msdn.co...ows-vista.aspx).
When our install runs using the admin token, the user cannot pick the mapped drive and we can't build our shortcuts correctly.
There is a registry hack that will allow the two tokens to share drive mapping but it is not supported by Microsoft and is not a good solution (see http://www.windowsco...nnections.aspx)
We are using InstallShield 12 to build our MSI install but we would be willing to concider some other tool.
Can anyone recommend a workaround or solution for this problem?


  • Full Members
  • 9 posts

Posted 16 July 2007 - 15:42

I've looked into this issue as we have noticed it during Vista testing as well. As it is a quirk of Vista itself, there is not really workaround - any setup tool will have the same issues if it is running under elevated priveliges.

The only way around it that I've found is to get the user to run a command prompt (using Run As Administrator) before running the install and using net use to map the network drive you want to use.

I would strongly advise against using the registry hack as it has the potential of screwing up your user's machines or suddenly changing all the admin mapped drives.

My opinion is that having different mapped drives for both user instances is pointless and will be logging with Microsoft to see what their stance is.


  • Full Members
  • 522 posts

Posted 18 July 2007 - 17:06

Vista applies the admin user token when the program is called either Setup.exe or Install.exe.
To bypass that behavior, you should add a manifest to Setup.exe before linking it (you add an XML file as a resource). In that case the manifest will tell Vista whether the program should be run with administrator priviliges or not.

If your setup requires admin priviliges (eg it wants to copy a file to ProgramFiles) it should later ask for those priviliges. Microsoft recommends using Windows Installer, which supports just that: run the UI in user priviliges, run the actual install in admin priviliges.