简体   繁体   中英

WIX: Run msi from mapped network drive

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM