1

I can fine a whole bunch of information on how to install packages using Package Management (nee PowerShellGet (nee OneGet)), but I can find nearly zero information on creating those packages.

I did find this which describes how to use the Publish-Module cmdlet to publish a PowerShell module, but I cannot find any information on how to create any other sorts of packages.

Specifically, I would like to create two types: from an .MSI, and from an .EXE. The .EXE I only need installed somewhere on the system, and I need the ability to update the PATH environment variable to allow it to be run by users. For the .MSI, I would ideally like it to be installed (using msiexec), but if that's not possible, I can use other means.

The only remotely-related information I can find is from Chocolatey, which is a system that predates Package Management but that Package Management works with (maybe? sorta? not really clear?). Chocolatey can create packages, but is that really the only way to create packages for Package Management?

Where can I find information on how to accomplish these packaging tasks?

Mark
  • 11,257
  • 11
  • 61
  • 97

1 Answers1

1

To quote Microsoft:

PackageManagement is essentially a Package Management Aggregator. It creates a unified and consistent PowerShell interface for users and provides a plug-in model at the back end that different installer technologies or package managers can plug-in as providers, using PackageManagement APIs. Each provider further manages one or multiple package sources (repositories) where software packages are stored.

This means there isn't a single way of creating packages, it will depend which Package Management Provider and/or Package Source you are using.

NuGet is widely documented, and so is Chocolatey (which has a plugin available for package management)

If you're looking to install your own private software, as opposed to commercially available software (where you're best off just using one of the existing repositories), you will need to create your own feed/repo. Again this will depend which options you're using. For example, the NuGet documentation on this is readily available.

henrycarteruk
  • 12,708
  • 2
  • 36
  • 40
  • I'm 100% clear on what Package Management is. I also know what NuGet is and how to create a NuGet package. That's not what I asked, though. How do you create a NuGet package that will install an .MSI or an .EXE. – Mark Nov 22 '16 at 20:11
  • You use Chocolatey. PackageManagement does not manage any packages whatsoever, only providers (it maybe should have been called PackageManagementManagement). If you want to manage EXE/MSI types of packages, you need to use Chocolatey or an alternative provider to do so. PackageManagement does not replace Chocolatey. – ferventcoder Jul 23 '17 at 02:53
  • James' answer here may not be what folks wanted to hear, but it is the correct answer. – ferventcoder Jul 23 '17 at 02:56