Question

I am including a file in Wix installer. The file has hyphen in it's name.

<File Name="my_file-with-hyphen-A.txt" Source="MyFolder\my_file-with-hyphen-A.txt" />

However when I look in cab file, the file is stored with the changed name of "my_file_with_hyphen_A.txt" i.e. hyphens are changed to underscore by Wix.

Another issue is that if I set the Id attribute of File element, the file name in cab is same as Id attribute. Shouldn't file name in cab be the same as Name attribute?

<File Id="myfilewithhyphenB" Name="my_file-with-hyphen-B.txt" Source="MyFolder\my_file-with-hyphen-B.txt" />

In last case the file name in cab is "myfilewithhyphenB".

I am using VS2012 and Wix 3.8 (I updated to Wix 3.9.16.0 and still have same issue). My question is how to include a file with hyphen?

Was it helpful?

Solution 2

A simpler way to extract the cab without installing it is to create an "admin image". To do this run msiexec /a file.msi TARGETDIR=%USERPROFILE%\Desktop\AdminImage.

OTHER TIPS

Yes an "admin" install would help you out here. I've had this happen and I believe it's because when you MSZIP these resource files to cab files the cab file follow ISO9660 therefore "-"hyphen/dash characters are not permitted and are changed to "_" underscores.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top