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..
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 )
I just did a quick check Just started the mammoth task of converting MRP v141 code to use the new routines where needed... This may take a few days
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.
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
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.
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" )
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
Is the vm's OS and Office activated? As i'm sure those parts are ok now and detect the correct activation status...
Nope, I never activate before sysprep (apply loader on network deploy) Should've mentioned that but Im "old af" ^^
A bit more been done to MRP to hopefully address the BIOS/DMI and a few options that used WMIC.exe..... Testing continues...