WIX:从映射的网络驱动器运行 msi
我已经使用延迟的自定义操作创建了 msi 包:
<CustomAction Id="TestTxt" BinaryKey="MyDLL" DllEntry="TestTxt" Execute="deferred" Impersonate="no" />
<CustomAction Id="SetTestTxt" Property="TestTxt" Value="[SourceDir]test.txt" />
此 CA 读取放置在 msi 旁边的 test.txt 文件的内容。
安装在本地驱动器和网络路径上运行良好, 但是当我尝试从映射的网络驱动器运行它时,CA 找不到文件 test.txt。 我收到 System.IO.DirectoryNotFoundException 异常...
您知道问题所在以及如何解决它吗? 谢谢!
I've created msi package with deferred Custom Action:
<CustomAction Id="TestTxt" BinaryKey="MyDLL" DllEntry="TestTxt" Execute="deferred" Impersonate="no" />
<CustomAction Id="SetTestTxt" Property="TestTxt" Value="[SourceDir]test.txt" />
This CA reads the content of test.txt file placed next to the msi.
The installation works fine from local drive and from network path,
BUT when I tried to run it from mapped network drive the CA couldn't find the file test.txt.
I get System.IO.DirectoryNotFoundException Exception...
Do you have an ideas of what can be the problem and how can I fix it?
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题可能是 msi 以提升的权限运行,在这种情况下,进程无法使用网络映射驱动器(请参阅 知识库 937624)。知识库中的解决方法意味着注册表编辑和计算机重新启动,因此我想到没有简单的解决方案。
The issue may be that the msi is run with elevated privileges, and in this case network-mapped drives are not available to the process (see KB 937624). Workaround in the KB implies registry editing and computer restart, so there's no simple solution coming to my mind.