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?
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.