Exit code 9009 from cmd basically means 'command not found'. In other words $(WixPath)heat
doesn't point to something executable, which is possible cause I don't see a property WixPath anywhere in the code shown. A quick way to debug this is use a Message
task with the same argumenst as for Exec
so you can see exactly what is trying to execute.
<Message Text='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER ....'/>
The paste the output on the command line, run it and check if it executes.