The installation failed in the SAFE-OS phase with an error during MIGRATE-DATA operation.

Discussion in 'Windows 11' started by illegaloperation, Jan 31, 2026.

  1. fabricio simoes

    fabricio simoes MDL Senior Member

    Dec 17, 2020
    328
    90
    10
    Too sensational, I wanted to learn but I don't know how to deal with creating scripts, I wanted to make one in Pt-br with all the structure that the iso has, not just changing the name of the index...
     
  2. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    54,774
    125,053
    450
    It took me years to learn without copying others work (actually nobody did it this way), in the beginning i did this all manually by using tools like GUI imagex and such, then manually line by line and next i gathered enough knowledge with help from @whatever127 and @abbodi1406 to be able to make a fully working script and it still is work in progress.

    Whwn i have more time i can see if i can do a little script for you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. fabricio simoes

    fabricio simoes MDL Senior Member

    Dec 17, 2020
    328
    90
    10
    Thank you, I appreciate it, it can be based on yours, I liked the iso, you can send it private if you don't want to publish it on the forum for everyone.
     
  4. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    54,774
    125,053
    450
    Reply to me on discord by dm, i will send it there, when i have time.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. fabricio simoes

    fabricio simoes MDL Senior Member

    Dec 17, 2020
    328
    90
    10
    If so, would the script look like this?


    Code:
    @echo off
    title Windows 11 25H2 AIO Consumidor pt-BR
    setlocal EnableExtensions EnableDelayedExpansion
    
    set DIR=%~dp0
    set WIM=%DIR%install.wim
    set IMG=%DIR%imagex.exe
    
    if not exist "%IMG%" (
      echo ERRO: imagex.exe nao encontrado
      pause
      exit /b 1
    )
    
    if not exist "%WIM%" (
      echo ERRO: install.wim nao encontrado
      pause
      exit /b 1
    )
    
    echo ==========================================
    echo  LIMPANDO INDICES EXISTENTES
    echo ==========================================
    
    for /L %%I in (2,1,30) do (
      "%IMG%" /delete "%WIM%" %%I >nul 2>&1
    )
    
    echo.
    echo ==========================================
    echo  CRIANDO 16 INDICES
    echo ==========================================
    
    REM Criar 15 copias do indice 1
    for /L %%I in (1,1,15) do (
      "%IMG%" /export "%WIM%" 1 "%WIM%" "TEMP" >nul
    )
    
    echo.
    echo ==========================================
    echo  APLICANDO FLAGS E DESCRICOES
    echo ==========================================
    
    REM ========= HOME =========
    "%IMG%" /flags Core /info "%WIM%" 1 "Win 11 (25H1) Home x64 pt-BR (26200.7705)" "Win 11 (25H1) Home x64 pt-BR (26200.7705)"
    "%IMG%" /flags Core /info "%WIM%" 2 "Win 11 (25H2) Home x64 pt-BR (26200.7705 - MRP)" "Win 11 (25H2) Home x64 pt-BR (26200.7705 - MRP)"
    "%IMG%" /flags Core /info "%WIM%" 3 "Win 11 (25H2) Home x64 pt-BR (26200.7705 - MRP - HWID)" "Win 11 (25H2) Home x64 pt-BR (26200.7705 - MRP - HWID)"
    "%IMG%" /flags Core /info "%WIM%" 4 "Win 11 (25H2) Home x64 pt-BR (26200.7705 - MRP - HWID - Office 365)" "Win 11 (25H2) Home x64 pt-BR (26200.7705 - MRP - HWID - Office 365)"
    
    REM ========= HOME SINGLE LANGUAGE =========
    "%IMG%" /flags CoreSingleLanguage /info "%WIM%" 5 "Win 11 (25H1) Home SL x64 pt-BR (26200.7705)" "Win 11 (25H1) Home SL x64 pt-BR (26200.7705)"
    "%IMG%" /flags CoreSingleLanguage /info "%WIM%" 6 "Win 11 (25H2) Home SL x64 pt-BR (26200.7705 - MRP)" "Win 11 (25H2) Home SL x64 pt-BR (26200.7705 - MRP)"
    "%IMG%" /flags CoreSingleLanguage /info "%WIM%" 7 "Win 11 (25H2) Home SL x64 pt-BR (26200.7705 - MRP - HWID)" "Win 11 (25H2) Home SL x64 pt-BR (26200.7705 - MRP - HWID)"
    "%IMG%" /flags CoreSingleLanguage /info "%WIM%" 8 "Win 11 (25H2) Home SL x64 pt-BR (26200.7705 - MRP - HWID - Office 365)" "Win 11 (25H2) Home SL x64 pt-BR (26200.7705 - MRP - HWID - Office 365)"
    
    REM ========= PRO =========
    "%IMG%" /flags Professional /info "%WIM%" 9  "Win 11 (25H1) Pro x64 pt-BR (26200.7705)" "Win 11 (25H1) Pro x64 pt-BR (26200.7705)"
    "%IMG%" /flags Professional /info "%WIM%" 10 "Win 11 (25H2) Pro x64 pt-BR (26200.7705 - MRP)" "Win 11 (25H2) Pro x64 pt-BR (26200.7705 - MRP)"
    "%IMG%" /flags Professional /info "%WIM%" 11 "Win 11 (25H2) Pro x64 pt-BR (26200.7705 - MRP - HWID)" "Win 11 (25H2) Pro x64 pt-BR (26200.7705 - MRP - HWID)"
    "%IMG%" /flags Professional /info "%WIM%" 12 "Win 11 (25H2) Pro x64 pt-BR (26200.7705 - MRP - HWID - Office 365)" "Win 11 (25H2) Pro x64 pt-BR (26200.7705 - MRP - HWID - Office 365)"
    
    REM ========= EDUCATION =========
    "%IMG%" /flags Education /info "%WIM%" 13 "Win 11 (25H1) Education x64 pt-BR (26200.7705)" "Win 11 (25H1) Education x64 pt-BR (26200.7705)"
    "%IMG%" /flags Education /info "%WIM%" 14 "Win 11 (25H2) Education x64 pt-BR (26200.7705 - MRP)" "Win 11 (25H2) Education x64 pt-BR (26200.7705 - MRP)"
    "%IMG%" /flags Education /info "%WIM%" 15 "Win 11 (25H2) Education x64 pt-BR (26200.7705 - MRP - HWID)" "Win 11 (25H2) Education x64 pt-BR (26200.7705 - MRP - HWID)"
    "%IMG%" /flags Education /info "%WIM%" 16 "Win 11 (25H2) Education x64 pt-BR (26200.7705 - MRP - HWID - Office 365)" "Win 11 (25H2) Education x64 pt-BR (26200.7705 - MRP - HWID - Office 365)"
    
    echo.
    echo ==========================================
    echo  FINALIZADO COM SUCESSO
    echo ==========================================
    pause
    exit /b 0
    
     
  6. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    54,774
    125,053
    450
    #26 Enthousiast, Feb 4, 2026
    Last edited: Feb 5, 2026
    This is becoming very offtopic for this thread and as i told you my script is not ready for publishing, it is not finished and only variables set for the index info, for example the actual iso i still make manually using utlra-ISO..

    Code:
    Bin\imagex /flags "Core" /info "AiO\x64\Sources\aio.install.wim" 1 "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD%)" "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD%)"
    Bin\imagex /flags "Core" /info "AiO\x64\Sources\aio.install.wim" 2 "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD% - MRP)" "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD% - MRP)"
    Bin\imagex /flags "Core" /info "AiO\x64\Sources\aio.install.wim" 3 "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD% - MRP - HWID)" "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD% - MRP - HWID)"
    Bin\imagex /flags "Core" /info "AiO\x64\Sources\aio.install.wim" 4 "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD% - MRP - O365)" "Win 11 (%BRANCHE%) Home x64 %LANG% (%BUILD%.%DELTABUILD% - MRP - Office 365 - Ohook)"
    
    For private use (as you said it was) there is no need for overcomplicating stuff to point to the wim folder or imagex (when you copy imagex to the system32 folder you don't even need to put in a path to it, in this case it is in my bin folder..


    Atm i am fighting of some kidney problems, hopefully just a simple kidneystone (had one when i was a little kid) and not something more severe like a renal pelvic inflammation (had that too when i was a little kid) or even worse, taking painkillers to ease the pain.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. fabricio simoes

    fabricio simoes MDL Senior Member

    Dec 17, 2020
    328
    90
    10
    Best wishes to you. I just wanted to learn, what you did for me was really good, I wish you well, I'll wait because I don't even know where to start, but thank you, take care...