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.
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|Trim|Stop] /Discard /SaveFormat:[wim|esd|swm] /SplitSize:[MB] /RemoveEditions:[i,j] /SaveDest:"[path]" /SaveDestMerge /CreateIso:"[path]" /IsoLabel:"[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 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)./SaveDestMerge- merge 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./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:"..."- download and integrate Windows updates for the loaded image (premium). 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- maximum number of processing threads to use./NewInstance(premium) - force a fresh independent process instead of routing the command to an already-running instance./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./?- show this command-line help. Run from a console (or with output redirected, e.g.ntlite.exe /? > help.txt) it prints to the console and exits; double-clicked with no console it shows in the app. It also opens on a command-line 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:
- 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"