TMEditX  The Ultimate MSIX Package Editor plus TmMsixDeploy To Documentation Index

    TMEditX Command Line Options and Automation

     

     
    TMEditX now supports a command line interface to automatically analyze and update your package.  This may be the simplest way to create packages yet!  Just run the command line against each package and the software will determine the right thing to do without further input in most cases. 

    It opens and analyzes the package and automatically applies all of the detected fixes.  If the PSF is indicated, it always adds the FileRedirection, DynamicDll, and RegLegacy fixups using the most generous configurations to improve the odds of compatibility.  If need for the EnvVar Fixup was detected, that will be added too.  All other of the fixes you normally see in the analyzer will also be applied.

    Depending on the command line options you provide, it can also save your package into either MSIX or CIM form, or leave the package open for your review before you save it yourself.

     The command line options are supported:

    /ApplyAllFixes After the package is opened it will automatically apply all pre-PSF fixes, PSF, and recommended fixups after analysis that might improve the odds of compatibility for older apps, possibly as modified by other options.  Skip and Use options will still override the use of the specific fixups.
    /ApplyCleanupFixes After the package is opened it will automatically apply all pre-PSF fixes, including the CleanupFixes.  PSF and Recommended fixes are not applied, unless other command line options request it.
    /RunUiMinimized Start the UI minimized to the taskbar.
    /SkipConsoleApps Configures PsfLauncher to not inject PsfRuntime into console apps that it launches.  Some, but not most, console apps will break upon dll injection.
    /SkipDyn Do not add the PSF DynamicLibraryFixup (even if analysis indicates)
    /SkipEnVar Do not add the PSF EnvironmentVariableFixup.
    /SkipFRF Do not add the PSF FileRedirectionFixup.
    /SkipRegLeg Do not add the PSF RegistryLegacyFixup.
    /UseLauncher Add PsfLauncher, even if not indicated by analysis.
    /UseDebugPsf By default, the release build of the PSF is used, but this option tells the tool to apply the debug build when applying the PSF.
    /UseWaitForDebugger If the PSF is added, the Debug version of the PSF will be used and the WaitForDebuggerFixup will be added.  This will pause the target application before it can run, waiting for a debugger (like Visual Studio) to attach to the process.  This is something developers might do with their code to debug.
    /UseTraceMonitor Add the PSF, TranceFixup, and PSFMonitor.  This option is not applicable if ApplyAllFixes is used.
    /UseFRF Add the PSF,FileRedirectionFixup, even if analysis does not indicate that it is needed.
    /UseDynDll Add the PSF DynamicLibraryFixup, and configure all applicable dlls in the package to the Json config.
    /UseRegLeg Add the PSF RegistryLegacyFixup, and configure the most commonly used rules to the Json config. Note: This fixup is automatically added any time the PSFLauncher is added through automation, so this setting has no effect currently.
    /AutoSkipPsf Acts as an opt out for the PSF; used in conjunction with /ApplyAllFixes to skip the PSF injection, even if detections indicate that it should be used.  This option will override any /Use option associated with the PSF.
    /AutoReplaceFrfWithMfr If Analysis indicates need for a file based fixup, or if /UseFrf was specified, then use MfrFixup instead of FileRedirectionFixup.  This setting is now deprecated as MfrFixup is now the default file based fixup selected by ApplyAllFixes.
    /AutoAddILV This probably should have been called /UseILV, it says to add InstalledLocationVirtualization to the AppXManifest, regardless of it the PSF is used.  When specified, it also ensures the if the MfrFixup is added it is added in IlvAware mode.
    /AutoSkipILV If the MFR fixup is added for any reason, set it to not use IlvAware mode and do not add InstalledLocationVirtualization to the AppXManifest.
    /AutoCopyDlls_PkgRoot Some apps use an API that skips where DynamicLibrary intercepts dll loading.  This available fixup finds all dlls in the package and copies them to the root folder of the package.  Should be used with /SkipDynLib.  Cannot be used if there is more than one dll with the same filename (see next item below).
    /AutoCopyDlls_System32 Some apps use an API that skips where DynamicLibrary intercepts dll loading.  This available fixup finds and analyzes all dlls in the package and copies them to the VFS/SystemX64 or VFS/SystemX86 folder as appropriate so they will be found.  Should be used with /SkipDynLib, especially for apps that have both 32 and 64 bit dlls.
    /AutoAllowDesktopShortcuts Overrides any tool configuration regarding the removal of "desktop shortcuts". This tells the tool to allow the package to keep "desktop shortcuts".  These are normally removed.
    /AutoRemoveDesktopShortcuts Overrides any tool configuration regarding the removal of "desktop shortcuts".  This setting causes the tool to remove them from the package.
    /AddCapabilityAllowElevation Adds AllowElevation to the capabilities list in the AppXManifest. If a primary application (i.e. shortcut, file association, or protocol launch) that does not elevate starts a child process that requires elevation, the AllowElevation Capability is required. Apps that require elevation for the primary entry point don't need this setting to be added to the AppXManifest (but it does no harm to add it).
    /AutoSaveAsMSIX After applying fixes, the package will automatically be saved as a MSIX package using the tool configuration.  In most cases, you would have configured TMEditX to increment the build number and save in the same folder with the filename using the updated build number.  If configured, the Publisher field will be updated to match the configured certificate and the package is also signed.
    /AutoSaveAsCIM DEPRECATED: To create a CIM package, you must now use the conversion option of the TMEditX GUI.
    /AutoSaveAsFolder The following argument is a path to a folder to save the package into, instead of the folder that the package came from.  The folder must already exist.
    /AutoSkipPackageSigning Specified to skip the package signing step, even if configured in the tool.
    filename If automation is to be used, the filename of the MSIX package to be opened must be added to the end of the command line.
    /ApplyAllFixes After the package is opened it will automatically apply all relevant fixes, plus those that might improve the odds of compatibility for older apps.
    /UseDebugPsf By default, the release build of the PSF is used, but this option tells the tool to apply the debug build when applying the PSF.
    /UseTraceMonitor Add the PSF, TranceFixup, and PSFMonitor.  This option is not applicable if ApplyAllFixes is used.
    /UseWaitForDebugger If the PSF is added, the Debug version of the PSF will be used and the WaitForDebuggerFixup will be added.  This will pause the target application before it can run, waiting for a debugger (like Visual Studio) to attach to the process.  This is something developers might do with their code to debug.
    /AutoSaveAsMSIX After applying fixes, the package will automatically be saved as a MSIX package using the tool configuration.  In most cases, you would have configured TMEditX to increment the build number and save in the same folder with the filename using the updated build number.  If configured, the Publisher field will be updated to match the configured certificate and the package is also signed.
    /AutoSaveAsCIM After applying fixes, the package will be automatically saved as a CIM package. The tool will create a new subfolder under the folder containing the input package and save the CIM there.  Tool configuration options for versioning are applied.
    /ReplaceVCRuntimesWithDependency VC++ Runtime dlls that can be replaced by a package reference to a Framework package (VC 110, 120, and 140) will be removed from the package and a reference to the framework package added to the AppXManifest file as a dependency.  This dependency would be automatically added, if missing, when the package is installed.  As these packages are maintained by Microsoft, they will automatically be updated when new CVEs are discovered.  This eliminates the need to find and patch your packages.
    filename If automation is to be used, the filename of the MSIX package to be opened is added to the command line.

     

     

    Examples of common usage:

    TMEditX Just open the application without a package and take no actions.
    TMEditX filename Open the named MSIX package and analyze it. Not fixes are automatically applied.
    TMEditX  /UseTraceMonitor /AutoSaveAsMSIX filename Open the named MSIX package, analyze it, but only add the Launcher, TraceFixup, and PsfMonitor. Save and sign the package appropriately.
    TMEditX /ApplyAllFixes /AutoSaveAsMSIX filename Open the named MSIX package, analyze if, apply all fixes for compatibility, save and sign the package appropriately.

     

     

Go to top