Apply XML File To System In CMD

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Apply XML File To System In CMD

#1 Post by r2du-soft » 17 Jul 2014 00:43

hi
In the past I was able to Apply XML file with cmd in system and can change windows change language settings with xml file.
now i can not remember how and with which command?

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Apply XML File To System In CMD

#2 Post by aGerman » 17 Jul 2014 13:35

Hmm, something like that:

Code: Select all

@echo off &setlocal
call :changeKL 0409
goto :eof


:changeKL LCID
>"%temp%\config.xml" (
  echo ^<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend"^>
  echo   ^<gs:UserList^>
  echo     ^<gs:User UserID="Current"/^>
  echo   ^</gs:UserList^>
  echo   ^<gs:InputPreferences^>
  echo     ^<gs:InputLanguageID Action="add" ID="%1:0000%1" Default="true"/^>
  echo   ^</gs:InputPreferences^>
  echo ^</gs:GlobalizationServices^>
)
control intl.cpl,, /f:"%temp%\config.xml"
del "%temp%\config.xml"
goto :eof

http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx

This should work under Win7. But as far as I know MS changed the general behavior for Win8 as I read there:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646305(v=vs.85).aspx

Regards
aGerman

Post Reply