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 "[TEMPLATE_DIR]my.zip" "[TempSourceFolder]data.xml"" 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