1

I feel that this question hasn't been answered to meet the conditions that I need which is why I'm starting a new question.

I'm going to have an installer which uses a PowerShell command to harvest all the data/files required via wix's heat command. Among those files is going to be OpenBoxAppLauncher.exe. What I want to do is that exe file will run as a .oblaunch (our company's file extension) when it is called.

So far I have the following but keep getting error after error:

<Component Id="OpenBoxApp" Guid="*" Directory="INSTALLLOCATION">
    <ProgId Id='OpenBoxAppLauncher.exe' Description='Open Box App Launcher' Advertise='yes'>
      <Extension Id='.oblaunch' ContentType='.oblaunch' Advertise='yes'>
        <Verb Id='open' Sequence='10' Command='Open' Target='$(var.OpenBoxAppLauncher.TargetPath)' Argument='"%1"'/>
      </Extension>
    </ProgId>   
</Component>

Errors included

Error 2 The Verb/@Target attribute cannot be specified because the element is advertised.

Error 2 The Verb/@Sequence attribute cannot be specified when attribute Advertise is present with value 'no'.

Sjharrison
  • 729
  • 3
  • 16
  • 39
  • Does [this](http://stackoverflow.com/a/2808320/1630171) help? – Ansgar Wiechers Dec 07 '15 at 23:25
  • Hi @AnsgarWiechers I've looked at that question, the answer provided if i'm correct simply extends the open with option, whereas I want it to do it automatically, if possible – Sjharrison Dec 08 '15 at 11:06
  • If the [answer](http://stackoverflow.com/a/2808320/2226988) to the other question is an example of what you want: Component with File, ProgId etc, you can create a simple XSLT to pass to [heat.exe -t x.xsl](http://wixtoolset.org/documentation/manual/v3/overview/heat.html) that would add the ProgId etc to the parent of the harvested `File[@Name="OpenBoxAppLauncher.exe"]`. – Tom Blodget Dec 09 '15 at 03:05

0 Answers0