Visual Studio Installer Project and Network Drives

I have created an installer in Visual Studios 2010 and i added some custom actions. It is meant to be a workstation installer so it would check to see if certain files exist in the destination folder and move shortcuts around after. However if i use a UNC path or a mapped network drive path as the destination folder and use the commands My.Computer.FileSystem.FileExists and System.IO.File.Exists they return false on a network drive. Is there a way to figure out in a custom action if the file exists. Currently I am using Windows XP to run the installer so UAC is not a factor here.


Custom actions in a VS setup project run with the system account, which has no network privileges and so can't get to see them. Also, mapped drives are a user-profile thing, not system-wide, so they belong to a particular user, so the system account won't see them because of that too.

So there isn't a good way to do this. It might work if the custom action ran with the installing user's account, but then it would not be elevated, and you'd need to go into the CustomAction table in the MSI file and turn off the the msidbCustomActionTypeNoImpersonate bit.

https://msdn.microsoft.com/en-us/library/aa368069(v=vs.85).aspx

链接地址: http://www.djcxy.com/p/44194.html

上一篇: ReSharper Unit Test Runner:支持部署项目

下一篇: Visual Studio安装程序项目和网络驱动器