Skip to main content

Package command

Package an application by downloading the information from Winget and creating a package for it.

Package command sample
wintuner package {packageId} --package-folder {root-package-folder}

Sample:

Package Oh My Posh to C:\Packages
wintuner package JanDeDobbeleer.OhMyPosh --package-folder C:\Packages --version "19.3.1"

Parameters

ParameterValueDescription
{packageId}Package idWhat is the package id?
--package-folder {folder}Root folderRoot folder where the desirect folder structure should be created.
-v {version} / --version {version}Package versionWhich version should be used? Exact version, or latest when empty.
--architecture {arg}Specify architectureArm64 or X64 (default) or X86
--installer-context {ctx}Specify installer contextSystem or User (default)
--use-wingetUse WingetUse Winget instead of the open-source index (windows only)
--verboseVerbose loggingSuper verbose logging, might help figuring out problems.
--jsonJson loggingOutputs all logging as Json, separated by platform line ending \r\n on Windows and \n on unix.
Package folder

The package will end up in {package-folder}\{package-id}\{version}, so make sure you use the same package folder each time. All the package are organized by package id and version automatically.

Technical description

  1. Discover latest version of package when no version is specified using the open-source index
  2. Loads package specific data from Winget repository
  3. Creates folder structure for package version {package-folder}\{packageId}\{version}
  4. Downloads the logo {package-folder}\{packageId}\logo.png
  5. Downloads the installer
  6. Validates the SHA256 hash of the installer
  7. Packages the installer as an .intunewin file {package-folder}\{packageId}\{version}\{setupName}.intunewin
  8. Generates a readme with all the information to manually upload the package to Intune
  9. Generates a detection script if the installer isn't an MSI {package-folder}\{packageId}\{version}\detection.ps1
  10. Generates an app.json file with all the package details needed to automatically deploy the package to Intune.

See PackageCommand.cs on GitHub.

Works on Linux

This command should work on any platform, except when you use the --use-winget option.