Вопрос

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?

Это было полезно?

Решение 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.

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top