0
votes

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!

1
SourceDir should be set correctly for mapped drives. You can try creating an installation log to see what value it has for a mapped network drive. - rmrrm
The SourceDir is correct. In the log of the CustomAction I can see that the missing file is M:\test.txt (M is the mapped drive)... - Hila

1 Answers

2
votes

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.