Running an executable on network share with CustomAction with wix?

Posted by martin on Stack Overflow See other posts from Stack Overflow or by martin
Published on 2010-02-22T13:58:07Z Indexed on 2010/05/01 12:47 UTC
Read the original article Hit count: 308

Hello,

i have created a msi-package which compresses some xml-files to a zip-file during installation. I have created a CustomAction for this purposes:

<CustomAction Id="CompressMy" BinaryKey="zipEXE" ExeCommand="a -tzip &quot;[TEMPLATE_DIR]my.zip&quot; &quot;[TempSourceFolder]data.xml&quot;" Return="check" HideTarget="no" Impersonate="no" Execute="deferred" />

The installation works fine, if i try to install to a local drive, but recently a customer wanted to install [TEMPLATE_DIR] to a network drive on Windows Vista. The CustomAction fails, because of the elevated install-user hasn't mapped the network drive, even if the installer-calling user has mapped the drive. This happens also, if I try to install to an unc-path. I use 7zip for compressing. I have added it to my msi-package.

I have tried to set Impersonate="yes", but then the Installations fails, if my TEMPLATE_DIR is f.e. the ProgramData-dir.

Do you have any idea what i can do? I thinked about checking if TEMPLATE_DIR is a network path, but I didn't know how i can check this. Or do you have any other Ideas how I can provide a local and a network installation while using this custom action.

Would be great if there are any advices,

greetings, Martin

© Stack Overflow or respective owner

Related posts about wix

Related posts about installer