Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How register a new keyboard in windows
Message
From
27/09/2004 13:02:35
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00946287
Message ID:
00946340
Views:
22
I am not sure if it works, but You may try 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]
Khubaib.DLL
Kho
[ToINF]
InstKeyb.INF

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

[SourceDisksFiles]
Khubaib.DLL.dll=1
InstKeyb.INF=1

[KeyboardReg]
HKLM,"%KEY_KLayout%\00020402",,,
HKLM,"%KEY_KLayout%\00020402","layout file",,Khubaib.DLL
HKLM,"%KEY_KLayout%\00020402","layout text",,%KBD_KHUBAB%
HKLM,"%KEY_KLayout%\00020402","layout id",,0044  && You can store the right LayUot ID here
HKLM,"SYSTEM\ControlSet001\Control\Keyboard Layout\DosKeybCodes",00020402,,bg && You can store the right codes & text here


[UnistReg]
HKLM,%UninstKEY%,,,
HKLM,%UninstKEY%,"DisplayName",,"Keyboard by Khubaib"
HKLM,%UninstKEY%,"UninstallString",,%11%"\rundll32.exe setupapi,InstallHinfSection Deinst 132 "%17%\InstKeyb.INF"

[Strings]
KEY_KLayout="system\currentcontrolset\control\keyboard layouts"
KBD_KHUBAB="Khubaib Keyboard Layout"
UninstKEY="SoftWare\Microsoft\Windows\CurrentVersion\Uninstall\Khubaib Keyboard Layout"


ENDTEXT
lcPath = ADDBS(SYS(5)+CURDIR())


STRTOFILE(lcINFFile, lcPath+"InstKeyb.INF")


ExtractFile("khubaib.dll",lcPath)



DECLARE INTEGER ShellExecute IN Shell32.DLL INTEGER hwnd,;
                                         STRING lpOperation,;
                                         STRING lpFile,; 
                                         STRING lpParameters,;
                                         STRING lpDirectory,;
                                         INTEGER nShowCmd
                                         
ShellExecute(0,"install","InstKeyb.INF","","",1)


*** Your function here
Function ExtractFile(tcFilename As String, tcDestPath As String)
         LOCAL lcDestFilename
         IF !USED("table1")
            USE table1 IN 0
         ENDIF

         SELECT table1
         LOCATE ALL FOR table1.mfilename=tcFilename
         lcDestFilename = ADDBS(tcDestPath)+tcFilename
         STRTOFILE(table1.mbinary,lcDestFilename)
Return(FILE(lcDestFilename))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform