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
Parameter | Value | Description |
---|---|---|
{packageId} | Package id | What is the package id? |
--package-folder {folder} | Root folder | Root folder where the desirect folder structure should be created. |
-v {version} / --version {version} | Package version | Which version should be used? Exact version, or latest when empty. |
--architecture {arg} | Specify architecture | Arm64 or X64 (default) or X86 |
--installer-context {ctx} | Specify installer context | System or User (default) |
--use-winget | Use Winget | Use Winget instead of the open-source index (windows only) |
--verbose | Verbose logging | Super verbose logging, might help figuring out problems. |
--json | Json logging | Outputs 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
- Discover latest version of package when no version is specified using the open-source index
- Loads package specific data from Winget repository
- Creates folder structure for package version
{package-folder}\{packageId}\{version}
- Downloads the logo
{package-folder}\{packageId}\logo.png
- Downloads the installer
- Validates the SHA256 hash of the installer
- Packages the installer as an
.intunewin
file{package-folder}\{packageId}\{version}\{setupName}.intunewin
- Generates a readme with all the information to manually upload the package to Intune
- Generates a detection script if the installer isn't an MSI
{package-folder}\{packageId}\{version}\detection.ps1
- 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.