Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How register a new keyboard in windows
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00946287
Message ID:
00946310
Vues:
17
>Dear all,
>How i can register a new keyboard in windows. or delete information form windows.
>thanks


Khubaib,
I don't know how to programaticly add or remove the keyboard layout, but You may create an INF file & run instalation from it:
TEXT TO lcINFFile NOSHOW

[version]
signature="$CHICAGO$"

[DefaultInstall]
CopyFiles=Keyboard_Copy_Files,ToINF
AddReg=KeyboardReg,UnistReg

[Deinst]
DelReg=KeyboardReg,UnistReg
DelFiles=Keyboard_Copy_Files,ToINF 

[DestinationDirs]
Keyboard_Copy_Files= 11    ;LDID_SYS %windir%\system 
ToINF=17                ;%windir%\inf

[Keyboard_Copy_Files]
kbdBF.dll

[ToINF]
BgphXP.inf

[SourceDisksNames]
1="","",1

[SourceDisksFiles]
kbdBF.dll.dll=1
BgphXP.inf=1

[KeyboardReg]
HKLM,"%KEY_KLayout%\00020402",,,
HKLM,"%KEY_KLayout%\00020402","layout file",,kbdBF.dll
HKLM,"%KEY_KLayout%\00020402","layout text",,%KBD_BPH%
HKLM,"%KEY_KLayout%\00020402","layout id",,0044
HKLM,"SYSTEM\ControlSet001\Control\Keyboard Layout\DosKeybCodes",00020402,,bg


[UnistReg]
HKLM,%UninstKEY%,,,
HKLM,%UninstKEY%,"DisplayName",,"BulgarianPhonetic XP by G. Atanasov"
HKLM,%UninstKEY%,"UninstallString",,%11%"\rundll32.exe setupapi,InstallHinfSection Deinst 132 "%17%\BgphXP.inf"

[Strings]
KEY_KLayout="system\currentcontrolset\control\keyboard layouts"
KBD_BPH="Bulgarian(Phonetic)"
UninstKEY="SoftWare\Microsoft\Windows\CurrentVersion\Uninstall\Bulgarian(Phonetic)"


ENDTEXT

STRTOFILE(lcINFFile, "InstKeyb.INF")

DECLARE INTEGER ShellExecute IN Shell32.DLL INTEGER hwnd,;
                                         STRING lpOperation,;
                                         STRING lpFile,; 
                                         STRING lpParameters,;
                                         STRING lpDirectory,;
                                         INTEGER nShowCmd
                                         
ShellExecute(0,"install","InstKeyb.INF","","",1)
This will install kbdBF.dll as a Keyboard LayOut named Bulgarian (Phonetic) in Windows\System32 dir. That INF file is prepared for Windwos XP SetUp.
The DLL must ne in the same folder as newly created InstKeyb.Inf
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform