Windows PE setup.exe is not starting Post-Setup after the install

JQ#

New Member
Messages
1
Reaction score
0
Hello there.

I tried to create an Windows PE image that will check some stuff on the machine and then launch the Windows 10 setup.exe file for image generated using NTLite.

After the WindowsPE finishes it's work, I am launching setup.exe with autounattend.xml file using powershell script below, but the Post-Setup is not starting after the installation.
Are there some additional parameters that I need to provide to setup.exe for Post-Setup to run after the installation? Or maybe I should run the installation differently? (When I launch the Win10 image as a regular bootable disk it works as intended.)

Code:
& "path\to\setup\on\disk\setup" -unattend:"path\to\setup\on\disk\autounattend.xml"
 
There's two separate versions of Windows Setup: boot.wim's X:\sources\setup.exe and the ISO's \Setup.exe

While both can install images, each program takes a different set of command line options.
Windows Setup Command-Line Options

To specify a Post-Setup command script, use the /PostOOBE option.
Code:
X:\sources\setup.exe /unattend:\path\to\unattend.xml /postoobe:\path\to\post-setup.cmd
 
Hello, I am in the same situation.

If I attach ISO generated via NTLite, it is able to boot just fine. But when I first do WinPE and then trigger ISO's \Setup.exe, it is stuck in post setup.

Should I trigger Setup.exe from X:\sources\setup.exe? And it will take desired parameters as it is taking via ISO install? Or I have to provide the necessary parameters?
 
boot.wim's X:\sources\setup.exe and the ISO's \Setup.exe are two separate clients.

If you need to perform an in-place upgrade, then read this thread:
In-place Upgrade Win10 to Win11 with custom ISO

You would have to figure out which drive the ISO media is mounted from. Something like:
Code:
for %%A in (D E F G H I J K L M N O P Q R S T U V W Y Z) do if exist %%A:\sources\setup.exe (
    set DRIVE=%%A
    goto :continue
)

:continue
%DRIVE%:\sources\setup.exe /auto upgrade /dynamicupdate disable /quiet /eula accept /installfrom %DRIVE%:\sources\install.wim /imageindex 1 /postoobe %DRIVE%:\path\to\SetupComplete.cmd

boot.wim's RAM disk is always X:, so that path can be fixed. But the ISO media's drive letter isn't guaranteed to be the same.
 
Back
Top