DEV Community

Discussion on: Create a .msi file for go program

Collapse
 
psteffensen profile image
psteffensen

Thank you for this tutorial. It works!

What can I do if I want to run one of my exe files during or after the install?

Collapse
 
psteffensen profile image
psteffensen • Edited

I got it working. I got help from this: wixtoolset.org/documentation/manua...

So the end of product.wxs looks like this now:

   <UI>
        <!-- Define the installer UI -->
        <UIRef Id="WixUI_HK" />
        <Publish Dialog="ExitDialog"
            Control="Finish"
            Event="DoAction"
            Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed
        </Publish>
    </UI>

    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
    <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Install Measurement Server Service" />
    <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>

    <!-- this should help to propagate env var changes -->
    <CustomActionRef Id="WixBroadcastEnvironmentChange" />

     <Property Id="WixShellExecTarget" Value="[#ApplicationFile1]" />
     <CustomAction Id="LaunchApplication"
         BinaryKey="WixCA"
         DllEntry="WixShellExec"
         Impersonate="yes" />

</Product>
Enter fullscreen mode Exit fullscreen mode
Collapse
 
abdfnx profile image
abdfn

nice