PowerShell module for modifying, repackaging, and PSF-patching MSIX packages. Provides a complete toolkit for opening, analysing, patching, and repacking MSIX files — including full Package Support Framework (PSF) integration.
Status: Working beta. Actively used in production packaging workflows.
- Windows PowerShell 5.1 (Windows 10 / 11)
- No additional modules required
Clone or copy the repository, then import the .psm1 directly:
Import-Module "C:\Tools\MSIXForcelets\src\MSIXForcelets.psm1" -ForceFor persistent availability, add the import to your PowerShell profile ($PROFILE).
Downloads makeappx.exe, signtool.exe, and msixmgr.exe from the official Microsoft
GitHub releases into the module's Libs\ folder. Only downloads when a newer version is
available.
Update-MSIXToolingMicrosoft PSF (from NuGet):
Update-MSIXMicrosoftPSFTim Mangan PSF (recommended — includes MFRFixup, FtaCom, RegLegacyFixup):
Update-MSIXTMPSFBoth commands place the files under <module>\MSIXPSF\ in a versioned subfolder.
The module automatically selects the latest Tim Mangan release on import, falling back to the latest Microsoft PSF if no Tim Mangan build is present.
# Show all available PSF installations and the active one (marked with *)
Set-MSIXActivePSFFramework -List
# Switch to a specific framework
Set-MSIXActivePSFFramework -Framework MicrosoftPSF
Set-MSIXActivePSFFramework -Framework 'TimManganPSF\2026-2-22_release'The -Framework parameter supports tab-completion.
# Show current settings
Get-MSIXForceletsConfiguration
# Change default architecture (Auto | x64 | x86)
Set-MSIXForceletsConfiguration -PSFDefaultArchitecture x64Import-Module "C:\Tools\MSIXForcelets\src\MSIXForcelets.psm1" -Force
Get-AppXManifestInfo "C:\Packages\MyApp.msix"
Get-MSIXApplications "C:\Packages\MyApp.msix"$cert = 'CN=Contoso'
$pfxPath = "$env:USERPROFILE\Desktop\Contoso.pfx"
$pfxPass = 'MyPass' | ConvertTo-SecureString -Force -AsPlainText
$msixIn = "$env:USERPROFILE\Desktop\MyApp_1.0.msix"
$msixOut = "$env:USERPROFILE\Desktop\MyApp_1.0_patched.msix"
# Extract
$pkg = Open-MSIXPackage -MsixFile $msixIn -Force
# Adjust publisher to match signing certificate
Set-MSIXPublisher -MSIXFolder $pkg -PublisherSubject $cert
# Repack
Close-MSIXPackage -MSIXFolder $pkg -MSIXFile $msixOut
# Sign
Set-MSIXSignature -MSIXFile $msixOut -PfxCert $pfxPath -CertPassword $pfxPassRedirects all application entries through PsfLauncher64.exe and writes config.json.
Set-MSIXActivePSFFramework -Framework 'TimManganPSF\2026-2-22_release'
$pkg = Open-MSIXPackage -MsixFile "C:\Packages\MyApp.msix" -Force
Add-MSIXPsfFrameworkFiles -MSIXFolder $pkg
Get-MSIXApplications -MSIXFolder $pkg |
ForEach-Object { Add-MSXIXPSFShim -MSIXFolder $pkg -MISXAppID $_.Id -PSFArchitektur x64 }
Close-MSIXPackage -MSIXFolder $pkg -MSIXFile "C:\Packages\MyApp_PSF.msix"# Redirect all writes to .txt files (package-relative base)
Add-MSIXPSFFileRedirectionFixup -MSIXFolder $pkg `
-Executable '.*' `
-PackageRelative `
-Patterns '.*\.txt'
# Redirect writes below a specific folder to a known folder
Add-MSIXPSFFileRedirectionFixup -MSIXFolder $pkg `
-Executable 'MyApp$' `
-KnownFolder 'LocalAppData' `
-Patterns '.*\.log' `
-RedirectTargetBase 'MyApp\Logs\'# Default HKCU/HKLM access normalisation rules — works with both PSF variants
Add-MSIXPSFDefaultRegLegacy -MSIXFolder $pkg# Modern file redirection fixup (replaces FileRedirectionFixup)
# Use -IlvAware $true when Add-MSIXInstalledLocationVirtualization is also active
Add-MSIXPSFMFRFixup -MSIXFolder $pkg -IlvAware $true
# Register all package DLLs so PSF can resolve load requests
Add-MSIXPSFDynamicLibraryFixup -MSIXFolder $pkgCaptures PSF trace output to the debugger or a file. Useful during packaging to identify which fixups are needed.
Add-MSIXPSFTracing -MSIXFolder $pkg `
-Executable 'MyApp$' `
-PSFArchitektur x64 `
-TraceMethod outputDebugString `
-TraceLevel allFailures
# View live output (requires DebugView or similar)
Start-MSIXPSFMonitorReady-made fix functions are available for several applications. Each function handles all necessary steps — open, patch, repack — in one call.
| Function | Application | Notes |
|---|---|---|
Add-MSIXFixAcrobatReaderDC |
Acrobat Reader DC | Registry access fix + virtual key |
Add-MSIXFixGimp |
GIMP 2.x | DLL search path, disables update check, removes TWAIN plug-ins |
Add-MSIXFixLibreOffice |
LibreOffice | ILV, shared fonts, Start Menu grouping |
Add-MSIXFixSSMS |
SQL Server Management Studio | SSMS 20 and earlier only; newer versions are not supported |
Add-MSIXFixWinRAR |
WinRAR | Classic shell extensions are replaced by static verbs; dynamic menu labels ("Add to 'archive.rar'") are not possible |
Corrects DLL loading, disables the built-in update check, and removes the TWAIN plug-in folder that causes crashes in the MSIX container.
$pfxPass = 'MyPass' | ConvertTo-SecureString -Force -AsPlainText
Add-MSIXFixGimp `
-MsixFile "$env:USERPROFILE\Desktop\gimp-2.10.36-x64.msix" `
-OutputFilePath "$env:USERPROFILE\Desktop\gimp-2.10.36-x64_fixed.msix" `
-Subject 'CN=Contoso' `
-Force `
-Verbose
Set-MSIXSignature `
-MSIXFile "$env:USERPROFILE\Desktop\gimp-2.10.36-x64_fixed.msix" `
-PfxCert "$env:USERPROFILE\Desktop\Contoso.pfx" `
-CertPassword $pfxPass# Add capability declarations
Add-MSIXCapabilities -MSIXFolder $pkg -Capabilities 'internetClient'
# Enable installed location virtualization (ILV)
Add-MSIXInstalledLocationVirtualization -MSIXFolderPath $pkg
# Override DLL search path
Add-MSIXloaderSearchPathOverride -MSIXFolderPath $pkg -FolderPaths 'VFS\ProgramFilesX64\MyApp'# Remove desktop7 shortcuts, temp files, empty folders
Invoke-MSIXCleanup -MSIXFolder $pkg
# Validate AppxManifest.xml against the MSIX schema
Test-MSIXManifest -MSIXFolder $pkg