Skip to content

[Feature]: Allow downloading the installer and package customization before packaging #201

@yatesa

Description

@yatesa

CommandLet

New-WtWingetPackage

Full command

New-WtWingetPackage -PackageId Microsoft.PowerToys -PackageFolder C:\Temp\IntuneApps -PartialPackage

Module version

1.1.1

What happened?

The documentation suggests that by using the -PartialPackage switch that it will not actually create the .intunewin file and files will be left, but when I used the switch it still created .intunewin file but with slightly different name "PowerToysSetup-0.91.1-x64.partial.intunewin" instead of "PowerToysSetup-0.91.1-x64.intunewin" and the only extra file in the folder was "metadata.xml".

The reason for using the partial switch is that I was expecting it to leave the source files so I could then create my own intunewin file as I needed a different uninstall command that used a script instead.
And the reason for needing a different uninstall command is the one used only uninstalls this specific version of PowerToys. If an earlier version was already installed or if later version is installed then the uninstall fails. In fact it also fails to install if an earlier version is installed too. I appreciate these are separate issues, but just providing context as to why I was needing to use the partialpackage switch .

Command output

PS C:\Temp> New-WtWingetPackage -PackageId Microsoft.PowerToys -PackageFolder C:\Temp\IntuneApps -PartialPackage
INFO: [WingetRepository] Loading package index from https://raw.githubusercontent.com/svrooij/winget-pkgs-index/main/index.v2.json
INFO: [WingetRepository] Saving package index to cache at C:\Users\<username>\AppData\Local\WingetCommunityRepo\index.v2.json
INFO: Packaging package Microsoft.PowerToys 0.91.1
INFO: [WingetManager] Getting package info for Microsoft.PowerToys 0.91.1 from github
INFO: [ComputeBestInstallerForPackageCommand] Computing best installer for Microsoft.PowerToys 0.91.1 Unknown
INFO: [IntuneManager] Generating IntuneWin package for Microsoft.PowerToys 0.91.1 X64 System in C:\Temp\IntuneApps
INFO: [IntuneManager] Downloading installer from https://github.com/microsoft/PowerToys/releases/download/v0.91.1/PowerToysSetup-0.91.1-x64.exe to C:\Users\<username>\AppData\Local\Temp\wintuner\Microsoft.PowerToys\0.91.1\PowerToysSetup-0.91.1-x64.exe
INFO: [Packager] Creating Intune package from C:\Users\<username>\AppData\Local\Temp\wintuner\Microsoft.PowerToys\0.91.1
INFO: [IntuneManager] Downloading logo from https://api.winstall.app/icons/Microsoft.PowerToys.png
INFO: [DefaultFileManager] Downloading https://api.winstall.app/icons/Microsoft.PowerToys.png to C:\Temp\IntuneApps\Microsoft.PowerToys\logo.png
WARNING: [IntuneManager] No logo found for Microsoft.PowerToys, place your image at C:\Temp\IntuneApps\Microsoft.PowerToys\logo.png
INFO: [IntuneManager] Writing package readme for package Microsoft.PowerToys

PackageId          : Microsoft.PowerToys
Version            : 0.91.1
PackageFolder      : C:\Temp\IntuneApps\Microsoft.PowerToys\0.91.1
PackageFile        : PowerToysSetup-0.91.1-x64.partial.intunewin
InstallerFile      : PowerToysSetup-0.91.1-x64.exe
InstallerArguments : /quiet /norestart

PowerShell version

7.5.1

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I won't demand an immediate answer

Metadata

Metadata

Assignees

Labels

PowerShellIssues related to the WinTuner PowerShell moduleenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions