Last active
December 6, 2017 09:55
-
-
Save paveljurca/f49b8ca9f90f7c16a08a620b02e29c79 to your computer and use it in GitHub Desktop.
Deploy custom keyboard layout (Windows 10)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set root=%~1 | |
REM set root="\\ad\DistribApp\scripts\" | |
REM ============================================= | |
IF NOT DEFINED root set root="." | |
REM run once | |
IF EXIST "%SYSTEMROOT%\system32\fr_layout.dll" exit /b | |
REM install | |
echo. | |
echo Please wait... | |
copy /V "%root%\fr_layout.dll" /B "%SYSTEMROOT%\system32\." /B 1>NUL: | |
IF %ERRORLEVEL% NEQ 0 exit /b | |
start "" /WAIT /B "%SYSTEMROOT%\system32\cscript.exe" /Nologo "%root%\reg.vbs" | |
echo %computername% OK >>"%root%\deployed.txt" | |
echo. | |
echo Installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend"> | |
<gs:UserList> | |
<!-- CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true" --> | |
<gs:User UserID="Current" /> | |
</gs:UserList> | |
<gs:InputPreferences> | |
<!-- CUSTOM KEYBOARD, 040c = FRENCH --> | |
<gs:InputLanguageID Action="add" ID="040c:a000040c" Default="false" /> | |
</gs:InputPreferences> | |
</gs:GlobalizationServices> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@control intl.cpl,, /f:"\\ad\DistribApp\scripts\layout.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LayoutName = "FR custom" | |
Set objShell = WScript.CreateObject("WScript.Shell") | |
objShell.RegWrite "HKLM\SYSTEM\ControlSet001\Control\Keyboard Layouts\a000040c\", "" | |
objShell.RegWrite "HKLM\SYSTEM\ControlSet001\Control\Keyboard Layouts\a000040c\Layout File", "fr_layout.dll", "REG_SZ" | |
objShell.RegWrite "HKLM\SYSTEM\ControlSet001\Control\Keyboard Layouts\a000040c\Layout Id", "00c0", "REG_SZ" | |
objShell.RegWrite "HKLM\SYSTEM\ControlSet001\Control\Keyboard Layouts\a000040c\Layout Display Name", LayoutName, "REG_SZ" | |
objShell.RegWrite "HKLM\SYSTEM\ControlSet001\Control\Keyboard Layouts\a000040c\Layout Text", LayoutName, "REG_SZ" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment