Multi-OEM/Retail Project {MRP} - Mk3

Discussion in 'MDL Projects and Applications' started by mxman2k, Oct 15, 2016.

  1. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    Possible non WMIC version...

    Code:
    
    @echo off
    
    echo Installed Languages:
    echo.
    for /f %%L in ('dir /ad /b "%SystemRoot%\System32\??-??"^|findstr /x "[a-z][a-z]-[a-z][a-z]"') do (
      if exist "%SystemRoot%\System32\%%L\ulib.dll.mui" echo %%L
    )
    
    echo.
    pause
    
    
    If works then can parse the output better.. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    AFAIK, all LPs and partial LIPs have explorer.exe.mui
    and some of those have different id structure (i.e. sr-Latn-CS / prs-AF / ha-Latn-NG)
    so maybe ...
    Code:
    for /f %%L in ('dir /ad /b "%SystemRoot%\*-*" ^|findstr /r "[a-z]-[a-z]"') do (
      if exist "%SystemRoot%\%%L\explorer.exe.mui" echo %%L
    )
     
  3. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    I just did a quick check :p

    Just started the mammoth task of converting MRP v141 code to use the new routines where needed... This may take a few days :D:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    #7544 mxman2k, Oct 27, 2021
    Last edited: Oct 27, 2021
    (OP)
    Done in MRP v141 so far:

    TPM data.
    Memory Free/Avail, (not done the banks information etc way too complex even when it was using WMIC.exe!!).
    Partial CPU data.

    Still a lot to go and then all the testing *sigh* m$ got a lot to answer to for removing that little gem.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    Something like this (with hopefully a better parsing output)
    Code:
    
    @echo off
    echo Installed Languages:
    SET "LocaleName="
    
    echo.
    
    for /f %%L in ('dir /ad /b "%SystemRoot%\*-*" ^|findstr /r "[a-z]-[a-z]"') do (
      if exist "%SystemRoot%\%%L\explorer.exe.mui" set "LocaleName=%LocaleName%,%%L"
    )
    
    if defined LocaleName (for /f %%j in ("%LocaleName:~1%") do (set "LocaleName=%%j"))
    
    echo Names: %LocaleName%
    echo.
    pause
    
    
    Rough around the edges i admit but kept it simple :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,588
    1,584
    150
    Works for me on W10 19044 but I dont have a VM with W11 available yet.

    PS. You know a better way for my "issue" above with Chinese not displaying in Language settings? I have to run that PS-script.
     
  7. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    DelayedExpansion is required inside for loop :)

    Code:
    setlocal EnableDelayedExpansion
    for /f %%L in ('dir /ad /b "%SystemRoot%\*-*" ^|findstr /r "[a-z]-[a-z]"') do (
      if exist "%SystemRoot%\%%L\explorer.exe.mui" set "LocaleName=!LocaleName!,%%L"
    )
     
  8. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
  9. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    Thought that setlocal stuff be needed - always try to avoid that as in the QT and MRP if i have that set it messes up some variables no idea why.

    will use the endlocal & SET "returnedvariable=xxxxx" to hopefully get around that weird issue i get :p
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    Is the vm's OS and Office activated?

    As i'm sure those parts are ok now and detect the correct activation status...:g:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,588
    1,584
    150
    Nope, I never activate before sysprep (apply loader on network deploy)

    Should've mentioned that but Im "old af" ^^
     
  13. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    Ah was worried i shafted something up :D:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    At least v140 of mrp still ok on w11 (non dev insider) with latest cu etc. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,315
    21,049
    210
    A bit more been done to MRP to hopefully address the BIOS/DMI and a few options that used WMIC.exe.....

    Testing continues... :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...