title: How do I create an installer application in WinForms?
body: <p>Not to be confused by questions like <em>&quot;How do I create an installer for a WinForms app?&quot;</em>. I want to create my own layout of the installer <strong>in</strong> <code>WinForms</code>. I want to create my own installer, using <code>WinForms</code>, including all of the installers' functionalities such as adding registry keys, certificate, user account choice (&quot;Me&quot; or &quot;All users on this computer&quot;). Of course, I assume that reinventing the wheel is possible, but comes with a lot of complications.</p>
  <p>That's why items like these exist:</p>
  <ul>
  <li><a href="https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects" rel="nofollow noreferrer">https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects</a></li>
  <li><a href="https://docs.microsoft.com/en-us/windows/msix/packaging-tool/tool-overview" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/msix/packaging-tool/tool-overview</a></li>
  </ul>
  <p>These &quot;templates&quot; allow you to add all functionality of an installer, including the files you wish you pack, &quot;with the push of a button&quot;. But they already have their own UI and I do not wish to poke deeper in them to customize the UI. I want to use <code>WinForms</code> to create the UI, options such as file destination(s), optional files, progress bar(s), rollbacks, referrals to websites, ads, etc.</p>
  <p>I do not want to create a typical WinForms project to mimic an installer, by simply having the files packed into its Resources or an external file to read/parse from, then copy them where they have to go. I would prefer using the functionalities from MSIX for instance and design my own UI. How do I accomplish this? Can I implement the MSIX Packaging functionality into a <code>WinForm</code> project then use it to calculate the progress, certificate validation, rollbacks and other mandatory behaviors of a Windows installer?</p>