Command Line
Automate NTLite from the command line - load images, save, export, create ISOs, apply changes, and download updates.
Many NTLite operations can be driven from the command line for scripting and unattended automation - loading an image, saving or exporting, creating an ISO, applying changes, and downloading updates. Command-line runs go through the same processing pipeline and the same license checks as the interface.
Switches use the Windows /Switch form, with values passed after a colon - for example /Index:1 or /Save:Stop. The same list is printed by running ntlite.exe /? in the app, which is the authoritative reference; this page mirrors it.
Multi-instance control: with NTLite already running, a command routes into that instance and controls it, rather than starting a throwaway process. Use /NewInstance to start a separate, independent process instead.
Usage
A typical invocation combines a source, an optional preset, and an action:
ntlite.exe /Path:"[image path]" /Load /Index:[X] /Preset:"[preset]" /Apply /Save[:Save|Stop] /Discard /SaveFormat:[wim|esd|swm] /SplitSize:[MB] /RemoveEditions:[i,j|All] /SaveDest:"[path]" /SaveDestMerge /CreateIso:"[ISO destination path]" /IsoLabel:"[ISO label]" /DownloadUpdates:"[options]" /ThreadMax:[threads] /Exit:AfterApply
For unattended scripting, the process exits with code 0 on success and a non-zero code on failure, and writes a single NTLite: <verb> SUCCESS or NTLite: <verb> FAILED line to the log for each action.
Source
Select and open an image to work on.
/Path:"..."- path to an image or an extracted image folder (WIM, ESD or SWM; extract an ISO to a folder first)./Index:N- image edition index to select within the image./Load- mount if needed and load the selected image for editing./Preset:"..."(Optional) - name of the preset in the Presets directory or a direct preset file path (repeat to combine several).
Process
Saving, format, edition, ISO, and apply options. These mirror the Image Options dialog and the Apply page, where the same choices are documented in full.
/Apply- start applying pending tasks./Save[:Save|Stop](Optional) - saving mode, bare/Saveequals/Save:Save. Save - save the image; Stop - Keep image mounted (stop before saving the loaded and install images, boot and recovery still save; requires/Apply)./Discard- unload the image, discarding the in-memory changes without saving./SaveFormat:[wim|esd|swm](Optional) - output container. wim is the standard format, ready for mounting and editing; esd is high-compression read-only (not supported on Windows 7 or boot/WinRE images); swm splits the image to bypass the FAT32 single-file 4 GB limit or span across multiple media./SplitSize:[MB](Optional) - SWM part size in MB (requires/SaveFormat:swm)./RemoveEditions:[i,j|All](Optional) - remove editions (1-based index list, comma-separated, orAllfor every edition that can be removed; requires/Save, and/Applyto change/SaveFormatin the same run)./SaveDest:"..."(Optional) - destination for exporting to a different file, leaving the source untouched (requires/Save; export-only, cannot combine with/Apply)./SaveDestMerge(Optional) - merge into an existing/SaveDestfile instead of overwriting it./CreateIso:"..."(Optional) - location where to save the resulting ISO image. No/Applyneeded - without/Pathit builds the loaded image; a/Pathnaming the loaded image applies its pending changes first, any other/Pathbuilds as-is./IsoLabel:"..."(Optional) - ISO label (up to 32 characters; requires/CreateIso)./Exit(Optional) - close a running NTLite. Bare/Exitcloses it if idle (refused while busy);/Exit:Nowcancels any in-flight work and closes immediately;/Exit:AfterApplycloses after the operation completes. The legacy/ExitAfter:[0|1]still parses as an alias of/Exit:AfterApply./Cancel- abort the running operation and keep NTLite open. Mirrors the GUI Cancel button and is the escape from a Busy refusal.
Note: /Save:Stop keeps the mount live for a later session, while /Discard throws the edits away and releases the image. /SaveDest always exports a copy and never modifies the loaded image; splitting straight to a separate destination (/SaveFormat:swm with /SaveDest) is not supported - split in place instead.
Updates
/DownloadUpdates:"..."Premium (Optional) - download and integrate Windows updates for the loaded image. Takes a comma-separated list of update types, applied where relevant to the loaded image:
AllDefault- RecommendedCU- Cumulative UpdatePCU- Preview Cumulative UpdateDE- Defender Engine UpdateDP- Defender Platform UpdateDU- Dynamic Setup UpdateEP- Enablement PackageESUNCU- .NET Framework Cumulative UpdateNHU- .NET Framework HotfixNF- .NET FrameworkPS- PowerShellSafeOSTerminalVCLibsVCLibsUWaRun- Windows Application Runtime 1.8WaRun2- Windows Application Runtime 2.0.*WingetWSLXAMLOOBE
Other
/ThreadMax:N(Optional) - maximum number of CPU threads to use. Useful in multi-instance scenarios to limit CPU usage./NewInstancePremium (Optional) - force a fresh independent process instead of routing the command to an already-running instance./Forget:"..."- remove the given item from the image history list by path. Standalone maintenance only; it does not delete anything from disk./?- command-line parameters, printed to the console when run from one (or with output redirected, e.g.ntlite.exe /? > help.txt), else shown in a window; also shown on a syntax error.
Examples
The full example shown by ntlite.exe /?:
ntlite.exe /Path:"D:\Test\WinEdit" /Load /Index:3 /Preset:"Main Preset" /Preset:"Additional Common Settings" /DownloadUpdates:"CU,NCU,Winget" /CreateIso:"D:\WinEdit.ISO" /IsoLabel:"WinUpdated" /ThreadMax:6 /Apply /Exit:AfterApply
Common single-purpose runs:
- Image load:
ntlite.exe /Path:"D:\Win11" /Load /Index:1 - Apply:
ntlite.exe /Path:"D:\Win11\sources\install.wim" /Index:1 /Preset:"D:\my.xml" /Apply /Save - Apply, convert to ESD, and build an ISO:
ntlite.exe /Path:"D:\Win11" /Index:1 /Apply /SaveFormat:esd /CreateIso:"D:\Win11.iso" /IsoLabel:"WIN11" - Build an ISO from an image folder, without loading it:
ntlite.exe /Path:"D:\Win11" /CreateIso:"D:\Win11.iso" /IsoLabel:"WIN11" - Export one edition to a new file, without loading it:
ntlite.exe /Path:"D:\src.wim" /Index:1 /Save /SaveDest:"D:\trimmed.wim" /RemoveEditions:All - Remove Reinstalls:
ntlite.exe /CleanCU - Force listing of undetected components:
ntlite.exe /ForceListComponents - Forget a history entry:
ntlite.exe /Forget:"D:\old.wim"