Search code examples
installationwixbundlecustom-action

Add showing HTML page due WiX installation


I have an issue with adding html show up in my WiX bundle. Have you any idea how to make it?


Solution

  • First way i have resolved is using internal WiX dll WixShellExec

    <Property Id="WixShellExecTarget" Value="[InputResourcesDir]index.html" />
    <CustomAction Id="OpenHtmlPage" BinaryKey="WixCA" DllEntry="WixShellExec" />
    
    <InstallExecuteSequence>
        <Custom Action='OpenHtmlPage' After='InstallFinalize'>NOT Installed</Custom>
    </InstallExecuteSequence>
    
    <Directory Id="InputResourcesDir" Name="resource">
        <Component Id="index.html" Guid="{EE71FB84-2328-474E-9E5C-A29D2AD6EFD5}">
            <File Id="filEE71FB842328474E9E5CA29D2AD6EFD5" 
            Source="$(var.project.path)/$(var.project.resourceDir)/index.html" />
         </Component>
    </Directory>
    
    <Feature Id>
        <ComponentRef Id="index.html"/>
    </Feature>
    

    but this way has a problem, bcs html page is opened by default application (Notepad, Sublime, Chrome etc) that obviosly maybe will not be a browser.