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:Trim. The same list is printed by running ntlite.exe /? in the app, which is the authoritative reference; this page mirrors it.
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|Trim|Stop] /Discard /SaveFormat:[wim|esd|swm] /SplitSize:[MB] /RemoveEditions:[i,j] /SaveDest:"[path]" /SaveDestAppend /CreateIso:"[path]" /IsoLabel:"[label]" /DownloadUpdates:"[options]" /ThreadMax:[threads] /ExitAfter:[0|1]
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 the image to load: a WIM, ESD, SWM, or ISO file, or an extracted image folder./Index:N- image edition index to select within the image./Load- load the selected edition for editing./Preset:"..."(optional) - name of the preset in the Presets directory, or a direct preset file path. Can be repeated to stack multiple presets.
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 the queued changes (runs the full processing pipeline, the equivalent of the Apply page Process button)./Save[:Save|Trim|Stop](optional) - saving mode, bare/Saveequals/Save:Save. Save commits the changes and keeps the other editions; Trim commits and deletes the other editions to save space;Stop halts before saving and keeps the mount in place (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]- SWM part size in MB (requires/SaveFormat:swm)./RemoveEditions:[i,j]- remove the listed editions by 1-based index, keeping the rest (requires/Save; cannot combine with/Save:Trim)./SaveDest:"..."- destination for exporting to a different file, leaving the source untouched (requires/Save; export-only, cannot combine with/Apply)./SaveDestAppend- append into an existing/SaveDestfile instead of overwriting it./CreateIso:"..."- location where to save the resulting bootable ISO image./IsoLabel:"..."- ISO label (disc volume name), up to 32 characters.
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:"..."- download and integrate Windows updates for the loaded image (premium). Takes a comma-separated list of update types where applicable - for exampleAll,Default(recommended),CU(Cumulative Update),NCU(.NET Cumulative Update),NF(.NET Framework),Winget,WSL,OOBE, and others.
Other
/ThreadMax:N- maximum number of processing threads to use./CleanCU- clean up reinstalled component parts on the current installation (the Remove Reinstalls shortcut)./ForceListComponents- force component listing for the loaded image./Forget:"..."- remove the given item from the image history list by path. Standalone maintenance only; it does not delete anything from disk./ExitAfter:[0|1]- exit after processing:0to disable,1to enable./?- show the command-line help in the app.
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 /ExitAfter:1
Common single-purpose runs:
- Load an edition for editing:
ntlite.exe /Path:"D:\Win11" /Load /Index:1 - Apply a preset and save:
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" - Export the loaded image to a new file:
ntlite.exe /Path:"D:\src.wim" /Index:1 /Save /SaveDest:"D:\trimmed.wim" - Clean reinstalled components on the host:
ntlite.exe /cleancu - Forget a history entry:
ntlite.exe /Forget:"D:\old.wim"