abbodi1406's Batch Scripts Repo

Discussion in 'Scripting' started by abbodi1406, May 4, 2017.

  1. armond

    armond MDL Addicted

    Jun 16, 2008
    736
    235
    30
    Well my bad. Sorry about that.:(
     
  2. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,748
    3,575
    60
    #2382 inTerActionVRI, Apr 24, 2023
    Last edited: Apr 25, 2023
    @abbodi1406 ,

    Could you put this as an option to enable gpedit in Home editions, in the convert-UUP script?

    I have not tested. But I've already used the variables you use, to expose it as an idea.

    Code:
    :dowork
    %_dism2%:"!_cabdir!" /Mount-Wim /Wimfile:"%_www%" /Index:%_inx% /MountDir:"%_mount%"
    if !errorlevel! neq 0 (
    %_dism1% /Image:"%_mount%" /Get-Packages %_Null%
    %_dism1% /Unmount-Wim /MountDir:"%_mount%" /Discard
    %_dism1% /Cleanup-Wim %_Nul3%
    goto :eof
    )
    if /i not %_nnn%==winre.wim if %_runIPA% equ 1 (
    set addGPedit=
    set copyGPeditMumCat=
    if %GPedit% equ 1 (
      if not exist "_tmpGPedit\" mkdir "_tmpGPedit"
      if not exist "_tmpGPedit\.*mum set copyGPeditMumCat=1
      if not exist "_tmpGPedit\.*mum set copyGPeditMumCat=1
    )
    if !copyGPeditMumCat! equ 1 (
      cd /D "%_mount%\servicing\Packages\" >nul
      for /F "tokens=*" %%# in ('dir /B /A:-D "%_mount%\servicing\Packages\*.mum" ^| findstr.exe /I "GroupPolicy-ClientTools-Package~ GroupPolicy-ClientExtensions-Package~" ^| findstr.exe /I "%PackageArchitecture%"') do (
        set "GPedit_FileName=%%~#"
        Copy /Y "%_mount%\servicing\Packages\!GPedit_FileName!" "_tmpGPedit\!GPedit_FileName:%revver%=!"
      )
      cd /D "%~dp0" >nul
    )
    if %GPedit% equ 1 (
      if %eHome% equ 1 if %_inx% equ %iHome% set addGPedit=1
      if %eHomN% equ 1 if %_inx% equ %iHomN% set addGPedit=1
    )
    if %addGPedit% equ 1 (
      echo.
      echo Adding GPedit to !_dDesc%_inx%! . . .
      for /F "tokens=*" %%# in ('dir /B /A:-D /O:N "_tmpGPedit\*.mum" ^| findstr.exe /I "!arch%_inx%!" ^| findstr.exe /I "GroupPolicy-ClientTools-Package~ GroupPolicy-ClientExtensions-Package~"') do (%_dism2%:"!_cabdir!" %dismtarget% /LogPath:"%_dLog%\!edition%_inx%!_GPedit.log" /Add-Package:"_tmpGPedit\%%~#")
    )
    echo.
    echo Adding Apps . . .
    
    Maybe it's not possible that way...
    But if it is possible in some other way, it would be very interesting.

    Thnks!

    EDIT: I improved my code. It's in line with the logic I needed to do on IMCK to work. I haven't tested it on ConvertUUP.
    I had to copy it to a temporary folder. And renamed removing "10.0.19041.1" or "10.0.22621.1".
    With minor tweaks this should work in ConvertUUP.
     
  3. thierry83

    thierry83 MDL Novice

    Mar 9, 2023
    8
    0
    0
     
  4. thierry83

    thierry83 MDL Novice

    Mar 9, 2023
    8
    0
    0
     
  5. Paul Mercer

    Paul Mercer MDL Expert

    Apr 6, 2018
    1,934
    4,149
    60
    is it possible to add arm64 support to the multi_arch_iso.cmd script?
    maybe GRUB can boot all the architectures if windows bootloader is not an option
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,766
    7,697
    210
    Intel x86 and ARM are two completely different platforms, different instruction sets etc. You would need an Emulator or Virtualizer translating instructions, and it would be slooow.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Paul Mercer

    Paul Mercer MDL Expert

    Apr 6, 2018
    1,934
    4,149
    60
    I know, and I even do not have any M1/M2 apple devices, I just curious if it's possible or not
    the first challenge should be Windows bootloader, but maybe GRUB can boot everything
    Ventoy says ARM64 UEFI is supported
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,807
    18,991
    340
    Only on selected hardware platforms.

    The low-level initialization routines on x86 and Arm platforms are fundamentally different, especially when it comes to the firmware bits.
     
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,711
    340
  10. tapangbedaru

    tapangbedaru MDL Junior Member

    Mar 6, 2022
    72
    33
    0
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,711
    340
    When did they became virtual?
     
  12. tapangbedaru

    tapangbedaru MDL Junior Member

    Mar 6, 2022
    72
    33
    0
    I mean adding editions in create_virtual_editions.cmd.
    I'm not sure if EnterpriseG and EnterpriseG N can be included in create_virtual_editions.cmd since the LTSC version is also included.
     
  13. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,766
    7,697
    210
    Virtual Editions are the ones you can switch to with a simple key change. The G Editions cannot be switched to that way, they are not Virtual Editions.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. tapangbedaru

    tapangbedaru MDL Junior Member

    Mar 6, 2022
    72
    33
    0
    now I understand why it wasn't included :thinking:
     
  15. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,711
    340
    You can always just check this to see the virtual editions
    Code:
    \Windows\servicing\Editions\EditionMappings.xml
     
  16. tapangbedaru

    tapangbedaru MDL Junior Member

    Mar 6, 2022
    72
    33
    0
    Yes... obviously I can see it... that's also why I asked.

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <WindowsEditions xmlns:e="urn:schemas-microsoft-com:windows:editions:v1">
        <Edition>
            <Name>CoreN</Name>
        </Edition>
        <Edition>
            <Name>CoreCountrySpecific</Name>
        </Edition>
        <Edition virtual="true">
            <Name>CoreSingleLanguage</Name>
            <ParentEdition>Core</ParentEdition>
        </Edition>
        <Edition>
            <Name>Core</Name>
        </Edition>
        <Edition virtual="true">
            <Name>CloudEditionN</Name>
            <ParentEdition>ProfessionalN</ParentEdition>
        </Edition>
        <Edition>
            <Name>ProfessionalN</Name>
        </Edition>
        <Edition virtual="true">
            <Name>CloudEdition</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition>
            <Name>Professional</Name>
        </Edition>
        <Edition>
            <Name>EnterpriseGN</Name>
        </Edition>
        <Edition virtual="true">
            <Name>EnterpriseN</Name>
            <ParentEdition>ProfessionalN</ParentEdition>
        </Edition>
        <Edition>
            <Name>EnterpriseNEval</Name>
        </Edition>
        <Edition virtual="true">
            <Name>IoTEnterpriseS</Name>
            <ParentEdition>EnterpriseS</ParentEdition>
        </Edition>
        <Edition>
            <Name>EnterpriseS</Name>
        </Edition>
        <Edition>
            <Name>EnterpriseSEval</Name>
        </Edition>
        <Edition>
            <Name>EnterpriseSN</Name>
        </Edition>
        <Edition>
            <Name>EnterpriseSNEval</Name>
        </Edition>
        <Edition virtual="true">
            <Name>ProfessionalEducation</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>ProfessionalEducationN</Name>
            <ParentEdition>ProfessionalN</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>ProfessionalWorkstation</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>ProfessionalWorkstationN</Name>
            <ParentEdition>ProfessionalN</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>Education</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>EducationN</Name>
            <ParentEdition>ProfessionalN</ParentEdition>
        </Edition>
        <Edition>
            <Name>PPIPro</Name>
        </Edition>
        <Edition virtual="true">
            <Name>ProfessionalCountrySpecific</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>ProfessionalSingleLanguage</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition>
            <Name>EnterpriseG</Name>
        </Edition>
        <Edition virtual="true">
            <Name>ServerRdsh</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>IoTEnterprise</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition virtual="true">
            <Name>Enterprise</Name>
            <ParentEdition>Professional</ParentEdition>
        </Edition>
        <Edition>
            <Name>EnterpriseEval</Name>
        </Edition>
        <Edition>
            <Name>Starter</Name>
        </Edition>
        <Edition>
            <Name>StarterN</Name>
        </Edition>
    </WindowsEditions>
    
     
  17. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,766
    7,697
    210
    EnterpriseG and EnterpriseGN are listed as Editions in the list, but they have no "ParentEdition" entry. They can thus not be virtually switched, neither from nor to any other Edition.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,711
    340
    #2398 abbodi1406, May 9, 2023
    Last edited: May 9, 2023
    (OP)
  19. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,711
    340
    uup-converter v89r

    - Added conditional support for build 22631 (which could be SV2 Moment 4, or just a test build)
     
  20. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,711
    340
    W10UI v10.28

    - Added conditional support for SV2 beta builds 22631+