0

I building an installer with visual studio. To include my files I use Heatdirectory in the wixproj-file.

Heat is including all the files (including the hidden files). That's what I want.

But: When files get copied to the target-system all of them are marked as visible. Is there any option to keep their state? I could not find anything.

greez

Muffex
  • 55
  • 1
  • 12

2 Answers2

1

You can set the hidden attribute for a file when its copied by the installer. This makes the file hidden. Take a look at:

http://wixtoolset.org/documentation/manual/v3/xsd/wix/file.html (Look at the attribute Hidden)

However, I do not see an easy way to set this attribute on a file element when the file is being harvested. The only way I know of is to transform the generated output from heat as described at:

http://codedmi.com/questions/1552266/how-to-systematically-set-readonly-attribute-to-files-harvested-using-heat

halfer
  • 19,824
  • 17
  • 99
  • 186
Kiran Hegde
  • 680
  • 4
  • 14
  • So I'm afraid that there is no real solution because the harvested files are a mixture of visibile and invisible files and folders. But anyway thank you for your time. – Muffex Jul 23 '15 at 11:04
  • Maybe anyone else has another clue? – Muffex Jul 23 '15 at 11:10
0

Because I could not find a direct way to archive my goal I created an Custom Action and a (Pre-Build-)C#-Program.

Before building the Installer I search for hidden files and folders and create lists for them with a C#-Program.

After the files have been installed a custom actions marks these files and folders as hidden.

Muffex
  • 55
  • 1
  • 12