[REPO/HOW-TO/CHAT] Audit/Sysprep/Generalize; Setupcomplete/Firstlogon; Silent Install

Discussion in 'Scripting' started by s1ave77, Feb 11, 2017.

  1. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    36
    10
    After using the script : error
    thank you for helping me

    Code:
    ===========================================================
    redits: maxXPsoft and MyselfIdem
    ===========================================================
    
    
    
    ===========================================================
    reating Work folders...
    ===========================================================
    one...
    
    
    ress a key to start
    
    
    cript Started At 14:35:29,70
    
    
    ===========================================================
    D:\[_CUSTOM_]\W10\19045\W10_19045.4355_EnterpriseS_x64_DaRT\sources"\background
    cli.bmp
    ===========================================================
    
    
    ===========================================================
    D:\[_CUSTOM_]\W10\19045\W10_19045.4355_EnterpriseS_x64_DaRT\sources"\spwizimg.d
    l
    ===========================================================
    
    
    odifying Boot 1
    ===========================================================
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 3
    
    e chemin d'accès spécifié est introuvable.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    ===========================================================
    :\Boot1\sources\background.bmp
    ===========================================================
    
    
    ===========================================================
    :\Boot1\sources\spwizimg.dll
    ===========================================================
    
    
    ===========================================================
    :\Boot1\Windows\System32\winpe.jpg
    ===========================================================
    
    
    ===========================================================
    :\Boot1\Windows\System32\winre.jpg
    ===========================================================
    
    
    one...
    
    oot 1 modified...
    ===========================================================
    
    
    ===========================================================
    ress a key to Save/Unmount Boot 1
    ===========================================================
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 50
    
    ette demande n'est pas prise en charge.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    
    odifying Boot 2
    ===========================================================
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 3
    
    e chemin d'accès spécifié est introuvable.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    ===========================================================
    :\Boot2\sources\background.bmp
    ===========================================================
    
    
    ===========================================================
    :\Boot2\sources\spwizimg.dll
    ===========================================================
    
    
    ===========================================================
    :\Boot2\Windows\System32\setup.bmp
    ===========================================================
    
    
    ===========================================================
    :\Boot2\Windows\System32\winpe.jpg
    ===========================================================
    
    
    ===========================================================
    :\Boot2\Windows\System32\winre.jpg
    ===========================================================
    
    
    one...
    
    oot 2 modified...
    ===========================================================
    
    
    ===========================================================
    ress a key to Save/Unmount Boot 2
    ===========================================================
    
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 50
    
    ette demande n'est pas prise en charge.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    ===========================================================
    ress a key to Export Boot.wim
    ===========================================================
    
    
    Code:
    ===========================================================
    redits: maxXPsoft and MyselfIdem
    ===========================================================
    
    
    ===========================================================
    reating Work folders...
    ===========================================================
    one...
    
    
    ress a key to start
    
    
    cript Started At 14:35:29,70
    
    
    ===========================================================
    D:\[_CUSTOM_]\W10\19045\W10_19045.4355_EnterpriseS_x64_DaRT\sources"\background
    cli.bmp
    ===========================================================
    
    
    ===========================================================
    D:\[_CUSTOM_]\W10\19045\W10_19045.4355_EnterpriseS_x64_DaRT\sources"\spwizimg.d
    l
    ===========================================================
    
    
    odifying Boot 1
    ===========================================================
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 3
    
    e chemin d'accès spécifié est introuvable.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    ===========================================================
    :\Boot1\sources\background.bmp
    ===========================================================
    
    
    ===========================================================
    :\Boot1\sources\spwizimg.dll
    ===========================================================
    
    
    ===========================================================
    :\Boot1\Windows\System32\winpe.jpg
    ===========================================================
    
    
    ===========================================================
    :\Boot1\Windows\System32\winre.jpg
    ===========================================================
    
    
    one...
    
    oot 1 modified...
    ===========================================================
    
    
    ===========================================================
    ress a key to Save/Unmount Boot 1
    ===========================================================
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 50
    
    ette demande n'est pas prise en charge.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    
    odifying Boot 2
    ===========================================================
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 3
    
    e chemin d'accès spécifié est introuvable.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    ===========================================================
    :\Boot2\sources\background.bmp
    ===========================================================
    
    
    ===========================================================
    :\Boot2\sources\spwizimg.dll
    ===========================================================
    
    
    ===========================================================
    :\Boot2\Windows\System32\setup.bmp
    ===========================================================
    
    
    ===========================================================
    :\Boot2\Windows\System32\winpe.jpg
    ===========================================================
    
    
    ===========================================================
    :\Boot2\Windows\System32\winre.jpg
    ===========================================================
    
    
    one...
    
    oot 2 modified...
    ===========================================================
    
    
    ===========================================================
    ress a key to Save/Unmount Boot 2
    ===========================================================
    
    
    util Gestion et maintenance des images de déploiement
    ersion : 6.1.7600.16385
    
    
    rreur : 50
    
    ette demande n'est pas prise en charge.
    
    e fichier journal DISM se trouve à l'emplacement C:\Windows\Logs\DISM\dism.log
    
    
    ===========================================================
    ress a key to Export Boot.wim
    ===========================================================
    
    
     
  2. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,923
    30
    Try it with the images I sent for testing... If it works for you, add your images, but keep the same name so you don't have to edit the script. This is just a suggestion.

    Before running the script as administrator, you must edit it to include the bin.wim file path, i.e.:

    :: ################################################################
    :: Update the DVDsources path according to your files
    :: ################################################################
    set DVDsources="D:\[_CUSTOM_]\W10\19045\W10_19045.4355_EnterpriseS_x64_DaRT\sources"

    Try it and see if it works!
     
  3. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    36
    10
    What files do I add before running the script : boot.wim or ( ex : widows ltsc 2019 iso) ?

    [​IMG]
     
  4. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,923
    30
    @maargueb

    I edited the script to make some steps easier, such as editing images and file paths.

    Download this new package:

    19045Pegasus.7z
    password: mdl2024
    https://www.mediafire.com/file/jx0zuft2rp8xabu/19045Pegasus.7z/file


    As I said before, if you want to change the image, I suggest you place it in the original's place within the Reshack folder, observing the following:

    IMG1.jpg (this image is originally 24-bit BITMAP and then renamed to JPG)
    IMG2.bmp (24-bit BITMAP image)
    Bitmap516.bmp (customized 24-bit BITMAP image)

    In my case, I extract all the ISO content that I want to modify to a folder and add the path to the script (line 40):
    set DVDsources="D:\[_CUSTOM_]\W10\19045\W10_19045.4355_EnterpriseS_x64_DaRT\sources"

    Run the script as administrator

    There is no need to add anything else.

    The script will modify the file D:\[_CUSTOM_]\W10\19045\W10_19045.4355_EnterpriseS_x64_DaRT\sources\Boot.wim

    Try!
     
  5. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    36
    10
    I extracted the Windows lts2019 ISO content and placed it in the following path:

    Code:
    C:\Users\username\Desktop\19045Pegasus 
    Run the script as administrator script
    An error appeared:

    [​IMG]
     
  6. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,923
    30
    #266 SunLion, May 13, 2024
    Last edited: May 13, 2024
    Try extracting the ISO to a short path, for example C:\LTSC2019.

    Or, if you prefer, extract the Pegasus folder to C:\
    Create a "DVD" folder inside the C:\Pegasus folder and extract the ISO contents to the DVD folder
    This way everything will be in C:\
    Change DVD folder path in script, line 40

    IMPORTANT:
    Whenever an error occurs with dism, do a cleanup before starting again.

    Create the Cleaner.cmd script with the content below:

    pushd "%CD%"
    CD /D "%~dp0"

    DISM /Cleanup-Wim
    IF EXIST boot1 RD /S /Q boot1
    IF EXIST boot2 RD /S /Q boot2
    IF EXIST "%~dp0Temp\Export\boot.wim" DEL /F /S /Q "%~dp0Temp\Export\boot.wim"
    IF EXIST "%~dp0Temp" RD /S /Q "%~dp0Temp"
    if exist "Reshack\spwizimg.dll" del /f /q "Reshack\spwizimg.dll"
    if exist "Reshack\spwizimg732_new.dll" del /f /q "Reshack\spwizimg732_new.dll"
    if exist "Reshack\spwizimg732_new.log" del /f /q "Reshack\spwizimg732_new.log"


    Save it to Pegasus folder and run as administrator
     
  7. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    36
    10
    The path is correct in the script (line 40):?

    Code:
    set DVDsources="D:\19045Pegasus\DVD\source
     
  8. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,923
    30
    #268 SunLion, May 13, 2024
    Last edited: May 14, 2024
    If you extracted it to directory "D:\" it would look like this:

    set DVDsources="D:\19045Pegasus\DVD\sources"

    If you extract it to C:\, it would look like the attached images:

     

    Attached Files:

  9. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    36
    10
    Thank you, after installing Windows on the VM :
    [​IMG]
    [​IMG]


    Another question:
    How can I change the image:
    Bitmap516_SunLion.bmp


    [​IMG]
     
  10. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,923
    30
    You can edit the image with Photoshop, remembering to save it as a 24-bit bitmap and keep the same size.

    In the package there is a folder with three more ready-made images, if you want to use them.

    Good luck!
     
  11. jineso

    jineso MDL Senior Member

    Oct 8, 2021
    296
    62
    10
    Thanks a lot for the amazing info, Please I am trying to find a way to automate installing some or windows features components that are located here:
    upload_2025-1-13_14-34-30.png
    Where may I add it?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. SunLion

    SunLion MDL Addicted

    May 11, 2011
    960
    2,923
    30
    You can use DISM or Powershell.

    See the examples in the attachments.

    Good luck!
     

    Attached Files: