Добавить показ HTML-страницы из-за установки WiX - PullRequest
0 голосов
/ 18 декабря 2018

У меня проблема с добавлением html-кода в мой комплект WiX.Ты хоть представляешь, как это сделать?

Ответы [ 2 ]

0 голосов
/ 20 декабря 2018

Второй способ решить проблему - открыть браузер по умолчанию

<Property Id="BROWSER">
    <RegistrySearch Id='DefaultBrowser' Type='raw' Root='HKCR' Key='http\shell\open\command' />
</Property>

<CustomAction Id="LaunchBrowser" Directory="INSTALLDIR" Impersonate="no" Execute="deferred" 
      ExeCommand='[BROWSER] "file://[InputResourcesDir]html.html"' Return="asyncNoWait"/>

<InstallExecuteSequence>
        <Custom Action='LaunchBrowser' Before='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>
0 голосов
/ 20 декабря 2018

Первый способ, который я решил - использовать внутреннюю 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>

, но при этом возникает проблема, HTML-страница bcs открывается приложением по умолчанию (Notepad, Sublime, Chrome и т. Д.), Которое явновозможно не будет браузером.

...