[W11 25H2] The RunOnceEX procedure is not executed


DMD

Well-known member
Member
Local time
10:03 PM
Posts
218
OS
W11
Good morning, I was trying the RunOnceEx procedure, which only works if I use the ISO structure of 23H2, and I can't understand why.

The ISO structure with RunOnceEX is as follows:

Schermata 2025-10-14 160319.webp

The scripts folder contains these instructions:
Code:
@echo off

SET CDROM=%WINDIR%\Setup

REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /v Flags /t REG_DWORD /d "20" /f

REG ADD %KEY% /V Title /D "Post Installation..." /f  >NUL

REG ADD %KEY%\01 /VE /D "Simple Sticky Notes" /f  >NUL
REG ADD %KEY%\01 /V 1 /D "%CDROM%\Software\Simple_Sticky_Notes_6.8.0.0.exe" /f  >NUL

REG ADD %KEY%\02 /VE /D "Visual_C++2015-2022_(14.44.35211.0)" /f  >NUL
REG ADD %KEY%\02 /V 1 /D "%CDROM%\Software\Visual_C++2015-2022_(14.44.35211.0).exe" /f  >NUL

REG ADD %KEY%\03 /VE /D "Open Shell" /f  >NUL
REG ADD %KEY%\03 /V 1 /D "%CDROM%\Software\Open_Shell_4.4.170_preconfig.exe" /f  >NUL


EXIT

The silent mode files are in the Software folder.
This structure in ISO 25H2 does not work. Should the procedure, which is now obsolete, be updated?

Thank you.
 

My Computer

System One

  • OS
    W11
    Computer type
    PC/Desktop
    CPU
    CPU AMD Ryzen 9 7950X
    Motherboard
    ASUS ROG Strix X670E-F Gaming WiFi
    Memory
    G.Skill Flare X5 32GB Kit DDR5-6000 CL32 (F5-6000J3238F16GX2-FX5)
    Monitor(s) Displays
    LG E2381VR
    Screen Resolution
    1920x1080
    Hard Drives
    1x Samsung Memorie MZ-V8P1T0B 980 PRO SSD 1TB
    2x Western Digital WD Red Nas 4TB
    PSU
    SEASONIC FOCUS PX-850 Plus Platinum
    Case
    Corsair 4000D Airflow
    Cooling
    ARCTIC Liquid Freezer II 280 A-RGB
    Keyboard
    Logitech G510
    Mouse
    Logitech G502 HERO
    Browser
    Firefox
    Antivirus
    Avg free
    Other Info
    Download: 90 Mbps
    Upload: 20Mbps
The $OEM$ layout is the same in 24H2 & 25H2, the only change is the new Setup client. Some users claim in certain cases, it's not copying $OEM$ content to the target folder (?)

1. Are your installer files copied to \Windows\Setup\Software? If true, then $OEM$ works as before.
2. What calls this script?
 

My Computer

System One

  • OS
    Windows 7
Good morning, Garlin.
The script is called “SetupComplete.cmd.”
After installation, the “Script” and ‘State’ folders are created in the “C:\Windows\Setup” path.
The following files are located in the “Scripts” folder:
Screenshot 2025-10-15 075211.webp


In the “State” folder

Screenshot 2025-10-15 075433.webp
 

My Computer

System One

  • OS
    W11
    Computer type
    PC/Desktop
    CPU
    CPU AMD Ryzen 9 7950X
    Motherboard
    ASUS ROG Strix X670E-F Gaming WiFi
    Memory
    G.Skill Flare X5 32GB Kit DDR5-6000 CL32 (F5-6000J3238F16GX2-FX5)
    Monitor(s) Displays
    LG E2381VR
    Screen Resolution
    1920x1080
    Hard Drives
    1x Samsung Memorie MZ-V8P1T0B 980 PRO SSD 1TB
    2x Western Digital WD Red Nas 4TB
    PSU
    SEASONIC FOCUS PX-850 Plus Platinum
    Case
    Corsair 4000D Airflow
    Cooling
    ARCTIC Liquid Freezer II 280 A-RGB
    Keyboard
    Logitech G510
    Mouse
    Logitech G502 HERO
    Browser
    Firefox
    Antivirus
    Avg free
    Other Info
    Download: 90 Mbps
    Upload: 20Mbps
You specified Flags = 20 (decimal) or 0x14 (hex)

ValueFunctionFunction definition
0x00000000DefaultAll functions are disabled
0x00000001DeleteDelete registry entries after processing them (normally only RunOnceEx)
0x00000002WaitCauses items to be run synchronously
0x00000004Check Shell StatusVerifies shell is ready to accept OLE commands
0x00000008No Error DialogsError dialog boxes are not displayed
0x00000010Create Error Log FileCreate C:\Windows\RunOnceEx.err file if errors occur
0x00000020Create Execution Log FileCreate C:\Windows\RunOnceEx.log file with status of commands
0x00000040No Exception TrappingDoes not trap exceptions that occur when registering DLLs
0x00000080No Status DialogStatus dialog box is not displayed while RunOnceEx runs
0x00000100 Ignore FlagsFlags registry key is ignored


Did you really intend to specify 0x20 (32 in decimal)?
 

My Computer

System One

  • OS
    Windows 7
I have always used setting 20. Are you saying that this is incorrect with the new ISO 24H2/25H2 structures?
 

My Computer

System One

  • OS
    W11
    Computer type
    PC/Desktop
    CPU
    CPU AMD Ryzen 9 7950X
    Motherboard
    ASUS ROG Strix X670E-F Gaming WiFi
    Memory
    G.Skill Flare X5 32GB Kit DDR5-6000 CL32 (F5-6000J3238F16GX2-FX5)
    Monitor(s) Displays
    LG E2381VR
    Screen Resolution
    1920x1080
    Hard Drives
    1x Samsung Memorie MZ-V8P1T0B 980 PRO SSD 1TB
    2x Western Digital WD Red Nas 4TB
    PSU
    SEASONIC FOCUS PX-850 Plus Platinum
    Case
    Corsair 4000D Airflow
    Cooling
    ARCTIC Liquid Freezer II 280 A-RGB
    Keyboard
    Logitech G510
    Mouse
    Logitech G502 HERO
    Browser
    Firefox
    Antivirus
    Avg free
    Other Info
    Download: 90 Mbps
    Upload: 20Mbps
reg add /t REG_DWORD /d 20 = hex 14
reg add /t REG_DWORD /d 0x20 = hex 20

0x20 = Create Execution Log File
0x14 = (0x10) Create Error Log File + (0x04) Check Shell Status

I think you've been doing the math wrong for a while. It doesn't change the running tasks, but you don't get the same log files.
My recommendation for debugging is "/d 0x32".

0x32 = (0x20) Create Execution Log + (0x10) Create Error Log + (0x2) Run synchronously
 

My Computer

System One

  • OS
    Windows 7
Please excuse my ignorance, but do I need to enter
REG ADD %KEY% /v Flags /t REG_DWORD /d “0x20” /f
to also obtain the execution log and error log?
 

My Computer

System One

  • OS
    W11
    Computer type
    PC/Desktop
    CPU
    CPU AMD Ryzen 9 7950X
    Motherboard
    ASUS ROG Strix X670E-F Gaming WiFi
    Memory
    G.Skill Flare X5 32GB Kit DDR5-6000 CL32 (F5-6000J3238F16GX2-FX5)
    Monitor(s) Displays
    LG E2381VR
    Screen Resolution
    1920x1080
    Hard Drives
    1x Samsung Memorie MZ-V8P1T0B 980 PRO SSD 1TB
    2x Western Digital WD Red Nas 4TB
    PSU
    SEASONIC FOCUS PX-850 Plus Platinum
    Case
    Corsair 4000D Airflow
    Cooling
    ARCTIC Liquid Freezer II 280 A-RGB
    Keyboard
    Logitech G510
    Mouse
    Logitech G502 HERO
    Browser
    Firefox
    Antivirus
    Avg free
    Other Info
    Download: 90 Mbps
    Upload: 20Mbps
You don't need the quotes.

REG ADD %KEY% /v Flags /t REG_DWORD /d 0x20 /f
 

My Computer

System One

  • OS
    Windows 7
  • Like
Reactions: DMD
I tried with the new value, test failed.
 

My Computer

System One

  • OS
    W11
    Computer type
    PC/Desktop
    CPU
    CPU AMD Ryzen 9 7950X
    Motherboard
    ASUS ROG Strix X670E-F Gaming WiFi
    Memory
    G.Skill Flare X5 32GB Kit DDR5-6000 CL32 (F5-6000J3238F16GX2-FX5)
    Monitor(s) Displays
    LG E2381VR
    Screen Resolution
    1920x1080
    Hard Drives
    1x Samsung Memorie MZ-V8P1T0B 980 PRO SSD 1TB
    2x Western Digital WD Red Nas 4TB
    PSU
    SEASONIC FOCUS PX-850 Plus Platinum
    Case
    Corsair 4000D Airflow
    Cooling
    ARCTIC Liquid Freezer II 280 A-RGB
    Keyboard
    Logitech G510
    Mouse
    Logitech G502 HERO
    Browser
    Firefox
    Antivirus
    Avg free
    Other Info
    Download: 90 Mbps
    Upload: 20Mbps
You're suppose to reveal what the log files reported. If FLAGS = x30, and you have no logs, then SetupComplete.cmd didn't run to create the RunOnceEx tasks.
 

My Computer

System One

  • OS
    Windows 7

My Computer

System One

  • OS
    W11
    Computer type
    PC/Desktop
    CPU
    CPU AMD Ryzen 9 7950X
    Motherboard
    ASUS ROG Strix X670E-F Gaming WiFi
    Memory
    G.Skill Flare X5 32GB Kit DDR5-6000 CL32 (F5-6000J3238F16GX2-FX5)
    Monitor(s) Displays
    LG E2381VR
    Screen Resolution
    1920x1080
    Hard Drives
    1x Samsung Memorie MZ-V8P1T0B 980 PRO SSD 1TB
    2x Western Digital WD Red Nas 4TB
    PSU
    SEASONIC FOCUS PX-850 Plus Platinum
    Case
    Corsair 4000D Airflow
    Cooling
    ARCTIC Liquid Freezer II 280 A-RGB
    Keyboard
    Logitech G510
    Mouse
    Logitech G502 HERO
    Browser
    Firefox
    Antivirus
    Avg free
    Other Info
    Download: 90 Mbps
    Upload: 20Mbps
I see a Schneegan's script running, but no SetupComplete.cmd in what I assume is the setupact.log. SetupComplete.cmd won't run if your PC detects an OEM product key in the BIOS.
 

My Computer

System One

  • OS
    Windows 7
After many tests, I found the culprit.
he autounattend file generated by Generate autounattend.xml files for Windows 10/11

In ISO 23H2, it worked with my RunOnceEx structure.
In ISO 24/25H2, the same RunOnceEx configuration with the same autounattend file does not work.
Without the autounattend file, the procedure works.
I contacted the author, who inserted a specific command for this:
Screenshot 2025-10-17 115338.webp

Inserting the new autounattend file generated with my RunOnceEx procedure in the 25H2 structure worked.
Thank you for the information you gave me, but I saw that my old procedure worked, as in ISO 23H2 do I still need to make the changes?

I have to fix another procedure that isn't working properly (Auditmode), but I'll continue on a specific thread.
 
Last edited:

My Computer

System One

  • OS
    W11
    Computer type
    PC/Desktop
    CPU
    CPU AMD Ryzen 9 7950X
    Motherboard
    ASUS ROG Strix X670E-F Gaming WiFi
    Memory
    G.Skill Flare X5 32GB Kit DDR5-6000 CL32 (F5-6000J3238F16GX2-FX5)
    Monitor(s) Displays
    LG E2381VR
    Screen Resolution
    1920x1080
    Hard Drives
    1x Samsung Memorie MZ-V8P1T0B 980 PRO SSD 1TB
    2x Western Digital WD Red Nas 4TB
    PSU
    SEASONIC FOCUS PX-850 Plus Platinum
    Case
    Corsair 4000D Airflow
    Cooling
    ARCTIC Liquid Freezer II 280 A-RGB
    Keyboard
    Logitech G510
    Mouse
    Logitech G502 HERO
    Browser
    Firefox
    Antivirus
    Avg free
    Other Info
    Download: 90 Mbps
    Upload: 20Mbps
I don't debug auto-generated unattended files, since it's not my code. This likely isn't a problem when using the legacy Setup.
 

My Computer

System One

  • OS
    Windows 7

Latest Support Threads

Back
Top Bottom