Bâshrat the Sneaky Posted May 16, 2004 Share Posted May 16, 2004 I'm sure there are somewhere in this forum some inf-experts. Could they please post some answers to the following questions?1. What's the official way to get a control panel installed trough an inf file?==>solved2. Is it sufficient to copy the *.cpl file to %systemroot%\system32 ? Or do you need to add some registry keys?==>solved=====>found it : all info beneath is usefull, and especially THIS link (quote with most important info is below): http://msdn.microsoft.com/library/default....dv/conpanel.aspApplication Setup____________________________________________________________________Every Control Panel application is a dynamic-link library. However, the DLL file must have a .cpl file name extension. For Windows 2000 and later systems, new Control Panel applications should be installed in the associated application's folder under the Program Files folder. The path of the DLL must be registered in one of two ways:If the Control Panel application is to be available to all users, register the path on a per-computer basis by adding a REG_EXPAND_SZ value to the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Control Panel\Cpls key, set to the DLL path. If the Control Panel application is to be available on a per-user basis, use HKEY_CURRENT_USER as the root key instead of HKEY_LOCAL_MACHINE .The following two examples register the MyCplApp Control Panel application. The DLL is named MyCpl.cpl and is located in the MyCorp\MyApp application directory. The first registry entry illustrates per-computer registration, and the second illustrates per-user registration. HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionControl PanelCplsMyCpl= %ProgramFiles%\MyCorp\MyApp\MyCpl.cplHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionControl PanelCplsMyCpl= %ProgramFiles%\MyCorp\MyApp\MyCpl.cplAssigning Control Panel Categories____________________________________________________________________As of the release of Windows XP, the Control Panel supports categorization of Control Panel applications. Windows XP also has support for third parties to add Control Panel applications to existing categories. However, third parties cannot add custom categories at this time.Registering a Control Panel Application in a CategoryYou can register a Control Panel application in a particular category by adding a REG_DWORD entry indicating the desired category to the registry. The following example registry entry assigns the application MyCPL.cpl to the category Appearance and Themes. Details of the entry are discussed in the following sections.HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionControl PanelExtended Properties{305CA226-D286-468e-B848-2B2E8E697B74} 2%SystemRoot%\System32\MyCPL.cpl= [REG_DWORD] 0x00000001The registry key {305CA226-D286-468e-B848-2B2E8E697B74} 2 is the container for all category entries. That key represents SCID_CONTROLPANELCATEGORY, and is composed of PSGUID_CONTROLPANEL and PID_CONTROLPANEL_CATEGORY, both defined in Shlguid.h.The Name entry is the full path of your .cpl file, using environment variables if desired. The Data entry for that Name should be one of the category IDs listed in the following table, stored as a REG_DWORD.Category ID Category Name 0x00000000 Other Control Panel Options. Any Control Panel application that does not specify a category ID is put in this category. 0x00000001 Appearance and Themes 0x00000002 Printers and Other Hardware 0x00000003 Network and Internet Options 0x00000004 Sounds, Speech, and Audio Devices 0x00000005 Performance and Maintenance 0x00000006 Date, Time, Language, and Regional Options 0x00000007 Accessibility Options 0x00000008 Add or Remove Programs 0x00000009 User Accounts 0xFFFFFFFF Do not add to any category The categories Add or Remove Programs and User Accounts work somewhat differently from other categories in Control Panel. When one or more applications are added to one of these two categories, the associated link in Control Panel opens a category page. The registered applications appear in the lower portion of the page under the heading "or Pick a Control Panel icon". When no applications are registered for one of these categories, the associated link in Control Panel directly invokes the standard Windows application for that category.The parent key name Extended Property derives from the fact that you can access this property from script through the ExtendedProperty method on the ShellFolderItem object. The following sample Microsoft JScript® code enumerates the Control Panel items and their category identifiers (IDs).Show ExampleFor Control Panel applications that are implemented as Shell namespace extensions—for example, fonts or scheduled tasks—specify the category ID in the registry under the CLSID entry. For example, the registry entry for the Administrative Tools folder is as follows.HKEY_CLASSES_ROOTCLSID{D20EA4E1-3957-11D2-A40B-OC5020524153}{305CA226-D286-468e-B848-2B2E8E697B74} 2= [REG_DWORD] 0x00000005In this case, you create a value named {305CA226-D286-468e-B848-2B2E8E697B74} 2, then store the category ID as a REG_DWORD as before.EXAMPLE.INF[DestinationDirs]DefaultDestDir = 11[aic78xx_Service_Inst]ServiceBinary = %12%\aic78xx.sys ==> when to use %##%Value Destination Directory : %##% possibilities____________________________________________________________________01 SourceDrive:\pathname (the directory from which the INF file was installed) 10 Windows directory This is equivalent to %windir%. 11 System directory This is equivalent to %windir%\system32 for NT-based systems, and to %windir%\system for Windows 9x/Me. 12 Drivers directory This is equivalent to %windir%\system32\drivers for NT-based platforms, and to %windir%\system\IoSubsys on Windows 9x/Me platforms. 17 INF file directory 18 Help directory 20 Fonts directory 21 Viewers directory 23 Color directory (ICM) (not used for installing printer drivers) 24 Root directory of the system disk. This is the root directory of the disk on which Windows files are installed. For example, if dirid 10 is "C:\winnt", then dirid 24 is "C:\". 25 Shared directory 30 Root directory of the boot disk, also known as "ARC system partition," for NT based systems. (This might or might not be the same directory as the one represented by dirid 24.) 50 System directory for NT-based operating systems This is equivalent to %windir%\system (NT-based systems only). 51 Spool directory (not used for installing printer drivers – see Printer Dirids) 52 Spool drivers directory (not used for installing printer drivers) 53 User profile directory 54 Directory where ntldr.exe and osloader.exe are located (NT-based systems only) 55 Print processors directory (not used for installing printer drivers) -1 Absolute path Value Shell Special Folder 16406 All Users\Start Menu 16407 All Users\Start Menu\Programs 16408 All Users\Start Menu\Programs\Startup 16409 All Users\Desktop 16415 All Users\Favorites 16419 All Users\Application Data 16422 Program Files 16427 Program Files\Common 16429 All Users\Templates 16430 All Users\DocumentsSources of information: 1. http://msdn.microsoft.com/library/default....te-inf_0ig7.asp2. http://support.microsoft.com/default.aspx?...kb;en-us;292463 Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted May 17, 2004 Author Share Posted May 17, 2004 ANYONE????? Link to comment Share on other sites More sharing options...
gosh Posted May 17, 2004 Share Posted May 17, 2004 Inf's don't require anything special to use cpl's. You could copy the cpl to system32 but you probably would want to add the correct registry entries. Search support.microsoft.com, it has articles that give the exact registry keys. Some microsoft cpl's can be registered using regsvr32-gosh Link to comment Share on other sites More sharing options...
/\/\o\/\/ Posted May 17, 2004 Share Posted May 17, 2004 I even noticed that the .clp extension isn't even necessaryif the application implements "CPlApplet" control.exe will add itwhen placed in the system32 dirgr /\/\o\/\/ Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted May 18, 2004 Author Share Posted May 18, 2004 I even noticed that the .clp extension isn't even necessaryif the application implements "CPlApplet" control.exe will add itwhen placed in the system32 dirgr /\/\o\/\/So what are you exactly saying?1. I assume the extension IS necessary, how would it else be recognised?2. Do you mean .cpl doesnt need to be registered? Link to comment Share on other sites More sharing options...
Bilou_Gateux Posted May 18, 2004 Share Posted May 18, 2004 I would like to suggest you to download at this URL :AR RAM DiskThe installation process use an inf file and copy a .cpl file wich can be found in control panel after install.It may answer your question. Look in section [RAMDisk.AddReg]RAMDISK.INF;Copyright © 2001-2002 AR SOft All rights Reserved; AR Soft RAM Disk 1.20[Version]Signature="$WINDOWS NT$"Class=MemDevClassGuid={1EFCBBB4-8750-46d8-A754-92D9911DD587}Provider=%ARSOFT%DriverVer=1/4/2002,1.20.00.1[DestinationDirs]DefaultDestDir = 12 ; driversCopyCPLFile = 11 ; system32; ================= Class section =====================[ClassInstall32]CopyFiles=CopyCPLFileAddreg=MemoryDeviceClassReg[MemoryDeviceClassReg]HKR,,,0,%ClassName%HKR,,Icon,,-5; ================= Device Install section =====================[sourceDisksFiles]ramdisk.sys=1ramdisk.cpl=1[sourceDisksNames]1=%DISK_NAME%,[Manufacturer]%ARSOFT%=RAMDiskDevice[RAMDiskDevice]; DisplayName Section DeviceId; ----------- ------- --------%RAMDisk.DRVDESC%=RAMDisk_Inst,RAMDISK[RAMDisk_Inst.NT]CopyFiles=RAMDisk.CopyFiles,CopyCPLFile;AddReg=RAMDisk.AddReg,RAMDisk_EventLog.AddReg[RAMDisk.CopyFiles]ramdisk.sys[CopyCPLFile]ramdisk.cpl,,,0x80000000[RAMDisk_Inst.NT.Services]AddService=ramdisk,0x00000002,RAMDisk_Service [RAMDisk_Service]DisplayName = %RAMDISK.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVERStartType = 2 ; SERVICE_START_AUTOErrorControl = 1 ; SERVICE_ERROR_NORMALServiceBinary = %12%\ramdisk.sysAddReg = RAMDisk.AddReg, RAMDisk_EventLog.AddReg[RAMDisk.AddReg]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\cpls","RAMDisk",FLG_ADDREG_TYPE_EXPAND_SZ,"%%SystemRoot%%\system32\ramdisk.cpl"[RAMDisk_EventLog.AddReg]HKLM,SYSTEM\CurrentControlSet\Services\EventLog\System\RAMDisk,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\Drivers\RAMDisk.sys"HKLM,SYSTEM\CurrentControlSet\Services\EventLog\System\RAMDisk,TypesSupported,0x00010001,7[strings]ARSOFT = "AR Soft"ClassName = "Memory Device"RAMDisk.SVCDESC = "AR Soft RAM Disk Service"RAMDisk.DRVDESC = "AR Soft RAM Disk Driver"DISK_NAME = "AR Soft RAM Disk Install Disk"REG_SZ = 0x00000000REG_MULTI_SZ = 0x00010000REG_EXPAND_SZ = 0x00020000REG_BINARY = 0x00000001REG_DWORD = 0x00010001Apart from the topic : i'm using a small 32 Mb RamdDisk with this driver to store all the unneeded to keep Cookies, Temporary Internet files, History and Temp folder. It's more faster than the HDD and all files are gone when i shutdown my notebook. no longer need to clean those folders with add-on tool. Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted May 19, 2004 Author Share Posted May 19, 2004 Thank you for your reply , Bilou_Gateux! Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted May 19, 2004 Author Share Posted May 19, 2004 I've found the EXACT documentation about how to register control panels! Finally...http://msdn.microsoft.com/library/default....dv/conpanel.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now