nonno fabio Posted December 14, 2010 Posted December 14, 2010 entries.ini commands supported by DXIntegrator[sysPrepOC]Component_Name=advpack.dll,LaunchINFSection,INF_FileName,SectionName;orComponent_Name=setupapi.dll,InstallHinfSection,INF_FileName,SectionName;;;example[SysPrepOC]Unlocker=advpack.dll,LaunchINFSection,Unlocker.inf,UnlockerSilverlight=setupapi.dll,InstallHinfSection,MSSlight.inf,Silverlight[General];;;example[General]BuildDate=2010-10-27T11:05:11ZDescription="Freeware tool which overcomes a Windows bug"Language=EnglishTitle=UnlockerVersion=1.9.0WebSite=http://ccollomb.free.fr/unlocker/processorArchitecture=x86 ; --> Warning: this key is used to force addon integration only in a certain system architecture; if present OS architecture is not the one defined in this key, DXIntegrator skips the AddOnForceLang=Italiano ; --> Warning: this key is used to force addon integration only in a certain system language; if present OS language is not the one defined in this key, DXIntegrator skips the AddOnReleaseType=True AddOnCustomizedby=OnePieceCopyright=CEDRICK 'NITCH' COLLOMBCompany=CEDRICK 'NITCH' COLLOMBInstallPackageName=Unlocker.infLastUpdateTime=2010-10-27T11:05:11Zabout Dirids: http://msdn.microsoft.com/en-us/library/ff553598%28v=VS.85%29.aspxabout Security Descriptor Definition Language to be used in [securityRegistry*Integration] and in [securityFiles*Integration]: http://msdn.microsoft.com/en-us/library/aa379567%28v=VS.85%29.aspxhttp://msdn.microsoft.com/en-us/magazine/cc982153.aspxhttp://blogs.technet.com/b/askds/archive/2008/04/18/the-security-descriptor-definition-language-of-love-part-1.aspxhttp://technet.microsoft.com/en-us/library/cc512610.aspx [securityRegistryBeforeIntegration];;;example[SecurityRegistryBeforeIntegration]"MACHINE\%KEY_SOFTWARE%\ProgramName",0,"D:P(A;CIOI;GR;;;BU)(A;CIOI;GA;;;BA)(A;CIOI;GA;;;SY)(A;CIOI;GA;;;CO)"[securityRegistryAfterIntegration];;;example[SecurityRegistryAfterIntegration]"MACHINE\%KEY_SOFTWARE%\ProgramName",,"D:P(A;CIOI;GR;;;BU)(A;CIOI;GR;;;BA)(A;CIOI;GA;;;SY)(A;CIOI;GA;;;CO)"DXIntegrator loads this HIVES as default, so like previous example if want to add reglines in HKLM\Software, you need to use MACHINE\%KEY_SOFTWARE%, if you want to add or delete reglines in HKLM\System instead, you need MACHINE\%KEY_SYSTEM%"%MountDir%\Windows\System32\config\SOFTWARE" = %KEY_SOFTWARE%"%MountDir%\Windows\System32\config\SYSTEM" = %KEY_SYSTEM%"%MountDir%\Windows\System32\config\SECURITY" = %KEY_SECURITY%"%MountDir%\Windows\System32\config\SAM" = %KEY_SAM%"%MountDir%\Windows\System32\config\COMPONENTS" = %KEY_COMPONENTS%"%MountDir%\Windows\System32\config\DEFAULT" = %KEY_DEFAULT%"%MountDir%\Users\default\ntuser.dat" = %KEY_NTUSER%"%MountDir%\Windows\system32\smi\store\Machine\schema.dat" = %KEY_SCHEMA%"%MountDir%\WINDOWS\system32\config\systemprofile\NTUSER.DAT" = %KEY_NTUSER_SP%"%MountDir%\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\UsrClass.dat" = %KEY_USRCLASS_SP%"%MountDir%\Windows\ServiceProfiles\LocalService\NTUSER.DAT" = %KEY_NTUSER_LS%"%MountDir%\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\Windows\UsrClass.dat" = %KEY_USRCLASS_LS%"%MountDir%\Windows\ServiceProfiles\NetworkService\NTUSER.DAT" = %KEY_NTUSER_NS%"%MountDir%\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\UsrClass.dat" = %KEY_USRCLASS_NS%"%MountDir%\Users\Administrator\NTUSER.DAT" = %KEY_NTUSER_ADMIN%"%MountDir%\Users\Administrator\AppData\Local\Microsoft\Windows\UsrClass.dat" = %KEY_USRCLASS_ADMIN%[securityFilesBeforeIntegration];;;example[SecurityFilesBeforeIntegration]%11%\FileName.exe,0,"D:P(A;;GA;;;BA)(A;;GR;;;SY)(A;;GR;;;BU)" %PROGRAMDATA%,0,"D:PAI(A;;0x1200a9;;;SY)(A;OICIIO;GXGR;;;SY)(A;;FA;;;BA)(A;OICIIO;GA;;;BA)(A;;0x1200a9;;;BU)(A;OICIIO;GXGR;;;BU)" %10%\regedit.exe,0,"D:P(A;CI;GR;;;LS)(A;CI;GR;;;BU)(A;CI;GR;;;PU)(A;CI;GA;;;BA)(A;CI;GA;;;SY)(A;CI;GA;;;CO)"[securityFilesAfterIntegration];;;example[SecurityFilesAfterIntegration]%11%\FileName.exe,0,"D:P(A;;GR;;;BA)(A;;GR;;;SY)(A;;GR;;;BU)" %ALLUSERSPROFILE%,0,"D:P(A;CI;GR;;;BU)(A;CI;GA;;;BA)(A;CI;GA;;;SY)(A;CI;GA;;;CO)"%16422%,0,"D:P(A;CI;GR;;;BU)(A;CI;GA;;;BA)(A;CI;GA;;;SY)(A;CI;GA;;;CO)" [TweaksAddReg];;;example[TweaksAddReg]HKLM, "%KEY_SOFTWARE%\ProgramName", "Test", %REG_SZ%, "Test....."HKLM, "Test\Test2", "Test2", %REG_SZ%, "Test2....." [color=green];;;see example in [ProcessesToRun*Integration] where RegHive has been loaded in HKLM\Test[/color][TweaksDelReg];;;example[TweaksDelReg]HKLM, "%KEY_SOFTWARE%\ProgramName"SourceFiles = Directory where the addon has been extractedMountDir = Directory where the image has been mounted Warning: %MountDir% is an optional variable, there's no need for it as MountDir is always DIRID 24 (Root directory of the system disk), so %24%\ is always mount directory destination[ProcessesToRunBeforeIntegration];;;example[ProcessesToRunBeforeIntegration]reg load HKLM\Test "%Mountdir%\Windows\System32\config\RegHive" "%SourceFiles%\ResHacker.exe" -delete "%16422%\Internet Explorer\iexplore.exe", "%16422%\Internet Explorer\iexplore.exe", Icon,,"%SourceFiles%\ResHacker.exe" -addoverwrite "%16422%\Internet Explorer\iexplore.exe", "%16422%\Internet Explorer\iexplore.exe", "%SourceFiles%\Icon.res",,,"%SourceFiles%\ResHacker.exe" -delete "%MountDir%\Program Files\Internet Explorer\iexplore.exe", "%MountDir%\Program Files\Internet Explorer\iexplore.exe", Bitmap,,"%SourceFiles%\ResHacker.exe" -addoverwrite "%MountDir%\Program Files\Internet Explorer\iexplore.exe", "%MountDir%\Program Files\Internet Explorer\iexplore.exe", "%SourceFiles%\Bitmap.res",,,[ProcessesToRunAfterIntegration];;;example[ProcessesToRunAfterIntegration]reg unload HKLM\Test"%SourceFiles%\ResHacker.exe" -delete "%MountDir%\windows\system32\FileName.exe", "%MountDir%\windows\system32\FileName.exe", Bitmap,,"%SourceFiles%\ResHacker.exe" -addoverwrite "%MountDir%\windows\system32\FileName.exe", "%MountDir%\windows\system32\FileName.exe", "%SourceFiles%\Bitmap.res",,,"%SourceFiles%\ResHacker.exe" -delete "%11%\FileName.exe", "%11%\FileName.exe", Icon,,"%SourceFiles%\ResHacker.exe" -addoverwrite "%11%\FileName.exe", "%11%\FileName.exe", "%SourceFiles%\Icon.res",,,Warning, these sections do same job of [securityFiles*Integration] sections but in different ways; they've been added for they who find hard to understand microsoft guides about "Security Descriptor Definition Language", so you can use these too; anyway it is suggested to use [securityFiles*Integration] section, safer e also faster1 = gives Admin permissions for a file or a directory2 = when destination is a directory, gives Admin permission for all files and subdirectories of specified directory3 = when destination is a directory, if it doesn't exist will be automatically created[FilePermissionsBeforeIntegration];;;example[b][FilePermissionsBeforeIntegration][/b]%10%\regedit.exe,1%COMMONPROGRAMFILES%,1%16426%\Filename.exe,1[FilePermissionsAfterIntegration];;;example[FilePermissionsAfterIntegration]%10%\test.exe,1 %PROGRAMFILES(X86)%,1%16428%\Test,3[AddProgram];;;example[AddProgram]Filerefox.exe[color=Green];or[/color]install_flash_player.exe -install -force"SetUp XXX.exe" /S[string];;;example[Strings]LANGNAME = "English"LANGUAGE = "ENU"MuiCultureDirectory = "en-US"LangIdHex = "409"Lang = "EN"LCID = "0409"UnlockerTip = "Freeware tool to overcome a Windows bug";or use multi localabout International INF Files http://msdn.microsoft.com/en-us/library/ff540208%28v=VS.85%29.aspx[Strings.0409]LANGNAME = "English"LANGUAGE = "ENU"MuiCultureDirectory = "en-US"LangIdHex = "409"Lang = "EN"LCID = "0409"UnlockerTip = "Freeware tool to overcome a Windows bug"[Strings.0410]LANGNAME = "Italiano"LANGUAGE = "ITA"MuiCultureDirectory = "it-IT"LangIdHex = "410"Lang = "IT"LCID = "0410"UnlockerTip = "Strumento freeware per superare un bug di Windows"DXIntegrator adds as default these keys in Strings sectionREG_SZ = 0x00000000REG_EXPAND_SZ = 0x00020000REG_DWORD = 0x00010001REG_QWORD = 0x000B0001REG_BINARY = 0x00000001REG_MULTI_SZ = 0x00010000REG_NONE = 0x00020001REG_KEYONLY = 0x00000010REG_KEYONLY_COMMON = 0x00002000REG_UNKNOWN = 0x00030001REG_NOCLOBBER = 0x00000002REG_DELVAL = 0x00000004REG_OVERWRITEONLY = 0x00000020REG_APPEND = 0x00000008 ;Append a given value to that of an existing named value entry. This flag is valid only if FLG_ADDREG_TYPE_MULTI_SZ is also set. The specified string value is not appended if it already exists.REG_64BITKEY = 0x00001000REG_32BITKEY = 0x00004000REG_SZ_64BITKEY = 0x00001000REG_SZ_32BITKEY = 0x00004000REG_SZ_NOCLOBBER = 0x00000002REG_SZ_NOCLOBBER_64BITKEY = 0x00001002REG_SZ_NOCLOBBER_32BITKEY = 0x00004002REG_SZ_DELVAL = 0x00000004REG_SZ_DELVAL_64BITKEY = 0x00001004REG_SZ_DELVAL_32BITKEY = 0x00004004REG_SZ_OVERWRITEONLY = 0x00000020REG_SZ_OVERWRITEONLY_64BITKEY = 0x00001020REG_SZ_OVERWRITEONLY_32BITKEY = 0x00004020REG_EXPAND_SZ_64BITKEY = 0x00021000REG_EXPAND_SZ_32BITKEY = 0x00024000REG_EXPAND_SZ_NOCLOBBER = 0x00020002REG_EXPAND_SZ_NOCLOBBER_64BITKEY = 0x00021002REG_EXPAND_SZ_NOCLOBBER_32BITKEY = 0x00024002REG_EXPAND_SZ_DELVAL = 0x00020004REG_EXPAND_SZ_DELVAL_64BITKEY = 0x00021004REG_EXPAND_SZ_DELVAL_32BITKEY = 0x00024004REG_EXPAND_SZ_OVERWRITEONLY = 0x00020020REG_EXPAND_SZ_OVERWRITEONLY_64BITKEY = 0x00021020REG_EXPAND_SZ_OVERWRITEONLY_32BITKEY = 0x00024020REG_DWORD_64BITKEY = 0x00011001REG_DWORD_32BITKEY = 0x00014001REG_DWORD_NOCLOBBER = 0x00010003REG_DWORD_NOCLOBBER_64BITKEY = 0x00011003REG_DWORD_NOCLOBBER_32BITKEY = 0x00014003REG_DWORD_DELVAL = 0x00010005REG_DWORD_DELVAL_64BITKEY = 0x00011005REG_DWORD_DELVAL_32BITKEY = 0x00014005REG_DWORD_OVERWRITEONLY = 0x00010021REG_DWORD_OVERWRITEONLY_64BITKEY = 0x00011021REG_DWORD_OVERWRITEONLY_32BITKEY = 0x00014021REG_QWORD_64BITKEY = 0x000B1001REG_QWORD_32BITKEY = 0x000B4001REG_QWORD_NOCLOBBER = 0x000B0003REG_QWORD_NOCLOBBER_64BITKEY = 0x000B1003REG_QWORD_NOCLOBBER_32BITKEY = 0x000B4003REG_QWORD_DELVAL = 0x000B0005REG_QWORD_DELVAL_64BITKEY = 0x000B1005REG_QWORD_DELVAL_32BITKEY = 0x000B4005REG_QWORD_OVERWRITEONLY = 0x000B0021REG_QWORD_OVERWRITEONLY_64BITKEY = 0x000B1021REG_QWORD_OVERWRITEONLY_32BITKEY = 0x000B4021REG_BINARY_64BITKEY = 0x00001001REG_BINARY_32BITKEY = 0x00004001REG_BINARY_NOCLOBBER = 0x00000003REG_BINARY_NOCLOBBER_64BITKEY = 0x00001003REG_BINARY_NOCLOBBER_32BITKEY = 0x00004003REG_BINARY_DELVAL = 0x00000005REG_BINARY_DELVAL_64BITKEY = 0x00001005REG_BINARY_DELVAL_32BITKEY = 0x00004005REG_BINARY_OVERWRITEONLY = 0x00000021REG_BINARY_OVERWRITEONLY_64BITKEY = 0x00001021REG_BINARY_OVERWRITEONLY_32BITKEY = 0x00004021REG_MULTI_SZ_64BITKEY = 0x00011000REG_MULTI_SZ_32BITKEY = 0x00014000REG_MULTI_SZ_APPEND = 0x00010008REG_MULTI_SZ_APPEND_64BITKEY = 0x00011008REG_MULTI_SZ_APPEND_32BITKEY = 0x00014008REG_MULTI_SZ_NOCLOBBER = 0x00010002REG_MULTI_SZ_NOCLOBBER_64BITKEY = 0x00011002REG_MULTI_SZ_NOCLOBBER_32BITKEY = 0x00014002REG_MULTI_SZ_DELVAL = 0x00010004REG_MULTI_SZ_DELVAL_64BITKEY = 0x00011004REG_MULTI_SZ_DELVAL_32BITKEY = 0x00014004REG_MULTI_SZ_OVERWRITEONLY = 0x00010020REG_MULTI_SZ_OVERWRITEONLY_64BITKEY = 0x00011020REG_MULTI_SZ_OVERWRITEONLY_32BITKEY = 0x00014020REG_NONE_64BITKEY = 0x00021001REG_NONE_32BITKEY = 0x00022001REG_NONE_NOCLOBBER = 0x00020003REG_NONE_NOCLOBBER_64BITKEY = 0x00021003REG_NONE_NOCLOBBER_32BITKEY = 0x00024003REG_NONE_DELVAL = 0x00020005REG_NONE_DELVAL_64BITKEY = 0x00021005REG_NONE_DELVAL_32BITKEY = 0x00024005REG_NONE_OVERWRITEONLY = 0x00020021REG_NONE_OVERWRITEONLY_64BITKEY = 0x00021021REG_NONE_OVERWRITEONLY_32BITKEY = 0x00024021REG_KEYONLY_64BITKEY = 0x00001010REG_KEYONLY_32BITKEY = 0x00004010REG_KEYONLY_NOCLOBBER = 0x00000012REG_KEYONLY_NOCLOBBER_64BITKEY = 0x00001012REG_KEYONLY_NOCLOBBER_32BITKEY = 0x00004012REG_KEYONLY_DELVAL = 0x00000015REG_KEYONLY_DELVAL_64BITKEY = 0x00001015REG_KEYONLY_DELVAL_32BITKEY = 0x00004015REG_KEYONLY_OVERWRITEONLY = 0x00000030REG_KEYONLY_OVERWRITEONLY_64BITKEY = 0x00001030REG_KEYONLY_OVERWRITEONLY_32BITKEY = 0x00004030REG_KEYONLY_COMMON_64BITKEY = 0x00003000REG_KEYONLY_COMMON_32BITKEY = 0x00006000REG_KEYONLY_COMMON_NOCLOBBER = 0x00002002REG_KEYONLY_COMMON_NOCLOBBER_64BITKEY = 0x00003002REG_KEYONLY_COMMON_NOCLOBBER_32BITKEY = 0x00006002REG_KEYONLY_COMMON_DELVAL = 0x00002005REG_KEYONLY_COMMON_DELVAL_64BITKEY = 0x00003005REG_KEYONLY_COMMON_DELVAL_32BITKEY = 0x00006005REG_KEYONLY_COMMON_OVERWRITEONLY = 0x00002020REG_KEYONLY_COMMON_OVERWRITEONLY_64BITKEY = 0x00003020REG_KEYONLY_COMMON_OVERWRITEONLY_32BITKEY = 0x00006020REG_UNKNOWN_64BITKEY = 0x00031001REG_UNKNOWN_32BITKEY = 0x00032001REG_UNKNOWN_NOCLOBBER = 0x00030003REG_UNKNOWN_NOCLOBBER_64BITKEY = 0x00031003REG_UNKNOWN_NOCLOBBER_32BITKEY = 0x00034003REG_UNKNOWN_DELVAL = 0x00030005REG_UNKNOWN_DELVAL_64BITKEY = 0x00031005REG_UNKNOWN_DELVAL_32BITKEY = 0x00034005REG_UNKNOWN_OVERWRITEONLY = 0x00030021REG_UNKNOWN_OVERWRITEONLY_64BITKEY = 0x00031021REG_UNKNOWN_OVERWRITEONLY_32BITKEY = 0x00034021; ServiceType valuesSERVICE_KERNEL_DRIVER = 0x00000001SERVICE_FILE_SYSTEM_DRIVER = 0x00000002SERVICE_ADAPTER = 0x00000004SERVICE_RECOGNIZER_DRIVER = 0x00000008SERVICE_WIN32_OWN_PROCESS = 0x00000010SERVICE_WIN32_SHARE_PROCESS = 0x00000020SERVICE_INTERACTIVE_PROCESS = 0x00000100SERVICE_INTERACTIVE_SHARE_PROCESS = 0x00000120; StartType valuesSERVICE_BOOT_START = 0x00000000SERVICE_SYSTEM_START = 0x00000001SERVICE_AUTO_START = 0x00000002SERVICE_DEMAND_START = 0x00000003SERVICE_DISABLED = 0x00000004; ErrorControl valuesSERVICE_ERROR_IGNORE = 0x00000000SERVICE_ERROR_NORMAL = 0x00000001SERVICE_ERROR_SEVERE = 0x00000002SERVICE_ERROR_CRITICAL = 0x00000003SPSVCINST_TAGTOFRONT = 0x00000001SPSVCINST_ASSOCSERVICE = 0x00000002SPSVCINST_DELETEEVENTLOGENTRY = 0x00000004SPSVCINST_NOCLOBBER_DISPLAYNAME = 0x00000008SPSVCINST_NOCLOBBER_STARTTYPE = 0x00000010SPSVCINST_NOCLOBBER_ERRORCONTROL = 0x00000020SPSVCINST_NOCLOBBER_LOADORDERGROUP = 0x00000040SPSVCINST_NOCLOBBER_DEPENDENCIES = 0x00000080SPSVCINST_NOCLOBBER_DESCRIPTION = 0x00000100COPYFLG_WARN_IF_SKIP = 0x00000001COPYFLG_NOSKIP = 0x00000002COPYFLG_NOVERSIONCHECK = 0x00000004COPYFLG_FORCE_FILE_IN_USE = 0x00000008COPYFLG_NO_OVERWRITE = 0x00000010COPYFLG_NO_VERSION_DIALOG = 0x00000020COPYFLG_OVERWRITE_OLDER_ONLY = 0x00000040COPYFLG_REPLACEONLY = 0x00000400COPYFLG_REPLACE_BOOT_FILE = 0x00001000COPYFLG_NOPRUNE = 0x00002000this is the integration process executed by DXIntegrator1 [FilePermissionsBeforeIntegration]2 [securityFilesBeforeIntegration]3 [ProcessesToRunBeforeIntegration]4 [securityRegistryBeforeIntegration]5 Offline Install Execution (installs addon AddOn)6 [TweaksAddReg]7 [TweaksDelReg]8 [securityRegistryAfterIntegration]9 [ProcessesToRunAfterIntegration]10 [securityFilesBeforeIntegration]11 [FilePermissionsAfterIntegration] Quote
nonno fabio Posted December 14, 2010 Author Posted December 14, 2010 (edited) DX Integrator INF file syntaxTo create a Multiple Platforms and Operating Systems setup.inf file you can use in your addon inf file these sections:http://www.wincert.net/forum/index.php?/forum/128-inf-discussion/http://msdn.microsoft.com/en-us/library/ff548687%28v=VS.85%29.aspxhttp://technet.microsoft.com/en-us/library/dd309538.aspxhttp://www.ryston.com/x/INF_web/http://www.osronline.com/ddkx/install/create-inf_4l47.htmSo the inf file of a True AddOn for Windows 2000/XP/2003/Vista/Seven must be as follows:[color=green][b];section installing Optional Components in 2000/XP/2003[/b][/color][Optional Components]SectionName[color=green][b];Optional Components section for Windows 2000/XP/2003 in nLite & RVMi[/b][/color][SectionName]........[color=green][b];Optional Components section for Windows Vista/Seven in DXIntegrator[/b][/color][SectionName.nt]........In this case Sysoc doesn't read section with ".nt" etc., so you can use directly section name inside inf file to install the component both in Windows 2000/XP/2003 and in Windows Vista/Sevenso if AddOn will be integrated in Windows 2000/XP/2003 with nLite & RVMi, sysoc will install [sectionName] section during windows setup If AddOn will integrated in Windows Vista/Seven withDXIntegrator instead, then DXIntegrator will read inf file according to microsoft rules about .inf file, meanging it will start to read sections in this way, first [sectionName.ntx86] or [sectionName.ntamd64]; if not found, then it will search for [sectionName.nt], then [sectionName], so in this case (Windows Vista/Seven) it wil find and install [sectionName.nt]; In this way [sectionName.nt] can be customized for a Windows Vista/Seven installation and [sectionName] for a Windows 2000/XP/2003 installation instead.Multiple PlatformsFor an inf file designed for a Multiple Platforms addon, you need these sections:[color=green][b];Install component only in x32 systems (x86)[/b][/color][SectionName.ntx86]........[color=green][b];Install component only in x64 systems (amd64)[/b][/color][SectionName.ntamd64]........In this case DXIntegrator wil choose which section will install according to choosen OSMultiple Operating SystemsFor an inf file designed for a Multiple Operating Systems AddOn instead, you need these sections (Warning: microsoft doesn't support these options during Defaultinstall; They can be used only if you integrate them with DXIntegrator. Microsoft supports them in inf file in HW install only http://msdn.microsoft.com/en-us/library/ff550743%28v=VS.85%29.aspxhttp://msdn.microsoft.com/en-us/library/ff539924%28v=VS.85%29.aspxhttp://msdn.microsoft.com/en-us/library/ff550743%28v=VS.85%29.aspx6.0 = Vista6.1 = Windows 7[color=green][b];Install component only in Windows Vista[/b][/color][SectionName.6.0]........[color=green][b];Install component only in Windows 7[/b][/color][SectionName.6.1]........Oppure[color=green][b];Install component only in Windows Vista[/b][/color][SectionName.nt.6.0]....[color=green][b];Install component only in Windows 7[/b][/color][SectionName.nt.6.1]....;in case of Multiple Platformshttp://msdn.microsoft.com/en-us/library/ff539924%28v=VS.85%29.aspx[color=green][b];Install component only in Windows Vista x32 (x86)[/b][/color][SectionName.ntx86.6.0]........[color=green][b];Install component only in Windows Vista x64 (amd64)[/b][/color][SectionName.ntamd64.6.0]........[color=green][b];Install component only in Windows 7 x32 (x86)[/b][/color][SectionName.ntx86.6.1]........[color=green][b];Install component only in Windows 7 x64 (amd64)[/b][/color][SectionName.ntamd64.6.1]........ Edited December 14, 2010 by nonno fabio Quote
nonno fabio Posted December 14, 2010 Author Posted December 14, 2010 (edited) How to add/delete code in Windows 7 installationFirst you must convert .reg file registry lines in INF file lines: for this you need n7Epsilon Reg2Inf toolHere's is an example of windows 7 tweak reg file:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PcaSvc]"Start"=dword:00000004[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\PcaSvc]"Start"=dword:00000004Export it with Notepad and send it to Reg2inf and you should get this:[Version]Signature="$Windows NT$"[Optional Components]MyRegTweaks[DefaultInstall]AddReg =REGEntries.AddRegDelReg =REGEntries.DelReg[MyRegTweaks]OptionDesc ="Registry Entries"Tip ="Registry Entries"Modes =0,1,2,3AddReg =REGEntries.AddRegDelReg =REGEntries.DelReg[REGEntries.AddReg]; Reg2Inf v0.46 - http://tinyurl.com/fgqyfHKLM,"SYSTEM\CurrentControlSet\services\PcaSvc","Start",0x10001,04,00,00,00HKLM,"SYSTEM\ControlSet001\services\PcaSvc","Start",0x10001,04,00,00,00[REGEntries.DelReg]; Reg2Inf v0.46 - http://tinyurl.com/fgqyfYou can already directly use this inf file: if you name it Test.inf the entries.ini command will be:[color=limegreen];This section contains entries that need to go into the [Components] section of the OCSysPrep.inf file. [/color][SysPrepOC]Test=advpack.dll,LaunchINFSection,Test.inf,MyRegTweaks[color=blue];for nLite RVMi in case you want to integrate the addon in Windows 2000/XP/2003 too[/color][color=limegreen];This section contains entries that need to go into the [Components] section of the Sysoc.inf file.[/color][sysoc]Test = ocgen.dll,OcEntry,Test.inf,HIDE,7If you want a more professional and/or customized inf file, the only lines needed are the ones under following sections:REGEntries.AddReg and REGEntries.DelReg; got them and create an inf file compatible with both nLite/RVMi in Windows 2000/XP/2003 and DXIntegrator in Windows Vista/Seven: see more here (italian): http://www.eng2ita.net/forum/index.php/topic,7071.0.htmlHere is a real example on how will must be your inf file in this case: [Version] - http://msdn.microsoft.com/en-us/library/ff547502%28v=VS.85%29.aspx in a normal inf file normale you need only signature command under this section:[Version]signature="$Windows NT$"[color=green]; or signature="$Chicago$"[/color]Also these commands are default in the inf file structure, so they read and used by DXIntegrator too to take out info, etc.:DriverVer=11/14/2010, %DSCP_ProductVersion%Provider=MicrosoftThese command instead:Customizedby=Berserk - DMDPackageDisplayName=%ProductName%PackageReleaseType=True AddOnPackageLanguage=%LANGNAME%PackageDescription=%DSCPTip%are optionals. They are read by DXIntegrator only, in general they're not mandatory because when DXIntegrator integrates an addon it reads entries.ini file and it writes them by itself if they're are missing. [Optional Components], is the section read by SYSOC in Windows 2000/XP/2003 during Windows setup to install optional components. You can write here from one to more section name to install, in this example DSCP onlyDSCP[Optional Components]DSCP[DSCP] is the section indicated by Optional Components section, so this is the one that SYSOC will install in Windows 2000/XP/2003 SetupFollowing command are SYSOC defaults: this means, for example, that if Modes is missing so SYSOC don't installs this section in Windows Setup OptionDesc ="%ProductName%"Tip ="%DSCPTip%"Modes = 0,1,2,3About AddReg: http://msdn.microsoft.com/en-us/library/ff546320%28v=VS.85%29.aspxAddReg = DSCP.Reg.Add.Values, DSCP.Add.Reg.ARPThis command can be used in every kind of inf file both from SetupAPI and Advpack etc., in this case it is used to install or add our regentries in system (in the example TWEAK doesn't consider regentries deletion so DelReg is not used)[DSCP.nt] is the section read and prepared for Windows Vista/Seven Setup by DXIntegrator in this case AddReg = DSCP.Reg.Add.Values, DSCP.Add.Reg.ARPBackupReg = DSCP.Reg.Restore.ValuesBackupReg is a command used in advanced INF options (when LaunchINFSectionEx is used: http://www.mdgx.com/INF_web/backup.htm). Now with DXIntegrator you can run it also from SetupApi or LaunchINFSection. In DXintegrator this command has same purpose: it saves the reg before installation and then restores it during Remove or Uninstall. The only difference in this case is that DXIntegrator backs up the reg in the same inf file, very useful in our case because reg rollback can be restored both in offline mode when DxIntegrator runs and in Online mode, for example when you want to unistall an addon from the Control Panel. The rollback section name is the same but with ".RollBack" at its end, for example the reg to be saved in DSCP.Reg.Backup section will be written by DXIntegrator lin DSCP.Reg.Backup.RollBack section (In this case it's not present because DSCP.Reg.Backup.RollBack will be created by DXIntegrator when the addon is installed in Offline Mode) [DSCP.PerUser] is an optional section: Sometimes regentries are not added in a correct way or Windows setup overwrites them so better add it always after setup using peruserinstall. Peruserinstall run always before first desktop in Windows setup, after Runonce and RunonceEx, this means it is the latest configuration of system.In this example is not needed but it is here to give you an example, to enable it you only need to add ".PerUser" in entries.ini section name like this:[color=limegreen];This section contains entries that need to go into the [Components] section of the OCSysPrep.inf file. [/color][SysPrepOC]DSCP=advpack.dll,LaunchINFSection,DSCP.inf,DSCP.PerUser[DestinationDirs] - http://msdn.microsoft.com/en-us/library/ff547383%28v=VS.85%29.aspx[DestinationDirs]DefaultDestDir = 17in this section you need to indicate directory destinations where to copy/delete/rename/etc. files. In the example is added to use "DefaultDestDir" command, and it shows where to copy inf file inf[DSCP.Reg.Add.Values] is the section shown in AddReg command under "DSCP" and "DSCP.nt" sections (as always this regline works with both Windows XP and Windows 7)[DSCP.Reg.Add.Values][color=limegreen]; Disables Program Compatibility Service[/color]HKLM,"SYSTEM\CurrentControlSet\services\PcaSvc","Start",0x10001,04,00,00,00HKLM,"SYSTEM\ControlSet001\services\PcaSvc","Start",0x10001,04,00,00,00[DSCP.Add.Reg.ARP] is the section shown in AddReg command under "DSCP" and "DSCP.nt" sections: these regentries adds removal option in Control Panel[DSCP.Add.Reg.ARP]HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","DisplayIcon", ,"%10%\regedit.exe"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","DisplayName", ,"%ProductName% %DSCP_ProductVersion%"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","DisplayVersion", ,"%DSCP_ProductVersion%"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","OnlineVersion", ,"%DSCP_ProductVersion%"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","Publisher", ,"DMD"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","UninstallString", ,"rundll32.exe advpack.dll,LaunchINFSection %17%\DSCP.inf,DefaultUninstall"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","URLInfoAbout", ,"http://www.eng2ita.net/forum/index.php/topic,6164.0.html"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","ParentKeyName", ,"OperatingSystem"HKLM,"%KEY_WIN_CURVER%\Uninstall\DSCP","ParentDisplayName", ,"%PARENT_DISPLAY_NAME%"[PerUserInst] is the section shown in PerUserInstall command under "DSCP.PerUser" section[PerUserInst]DisplayName=%ProductName%Version=1.0.0000.0IsInstalled=1ComponentID=DSCPGUID={x0020200-ecbd-11cf-8b85-00aa0050dscp}Locale=enStubPath=rundll32.exe advpack.dll,LaunchINFSection %17%\DSCP.inf,PerUser.Install,1,NStubPath command shows the command to run: in the example it runs the command which installs "PerUser.Install" section[PerUser.Install] is the section to be installed in PerUser Mode in StubPath command under "PerUserInst" section[PerUser.Install]AddReg = DSCP.Reg.Add.Values, DSCP.Add.Reg.ARPDelReg = PerUser.CleanUp[PerUser.CleanUp] is the section indicated in DelReg command under "PerUser.Install" section[PerUser.CleanUp]HKCU,"Software\Microsoft\Active Setup\Installed Components\>{x0020200-ecbd-11cf-8b85-00aa0050dscp}"HKLM,"Software\Microsoft\Active Setup\Installed Components\>{x0020200-ecbd-11cf-8b85-00aa0050dscp}"HKU,".DEFAULT\Software\Microsoft\Active Setup\Installed Components\>{x0020200-ecbd-11cf-8b85-00aa0050dscp}"HKU,"S-1-5-18\Software\Microsoft\Active Setup\Installed Components\>{x0020200-ecbd-11cf-8b85-00aa0050dscp}"HKU,"S-1-5-19\Software\Microsoft\Active Setup\Installed Components\>{x0020200-ecbd-11cf-8b85-00aa0050dscp}"HKU,"S-1-5-20\Software\Microsoft\Active Setup\Installed Components\>{x0020200-ecbd-11cf-8b85-00aa0050dscp}"this will remove all regentries used in peruser mode: better do this as peruser mode has been used only to execute a single command and nothing else but generally you can also not remove these lines, so everytime you add a new user account, with new configurations "rundll32.exe advpack.dll,LaunchINFSection %17%\DSCP.inf,PerUser.Install" will start again.Warning: this is valid with DXIntegrator in Windows Vista/Seven only: in Windows 2000/XP/2003 nLite/RVMi won't work because SYSOC doesn't recognize PerUserInstall command. In Windows 2000/XP/2003 you must use a different way (see inside Onepiece's IE7/8 addon)[DefaultUninstall] is the section indicated in "DSCP.Add.Reg.ARP" section, in other word the section executed when Control Panel uninstall is chosen[DefaultUninstall]BeginPrompt = BeginUnInsPromptAddReg = DSCP.Reg.Backup.RollBackDelReg = DSCP.Add.Reg.ARPUpdateInis = DSCP.OCSysPrep.CleanUpEndPrompt = EndUnInsPromptCleanUp = 1[DSCP.OCSysPrep.CleanUp] is the section indicated in UpdateInis command under "DefaultUninstall" section[DSCP.OCSysPrep.CleanUp]%17%\OCSysPrep.inf,Components,DSCP=*This section removes the component from [Components] section in %WinDir%\inf\OCSysPrep.inf (as SYSOC does in Windows 2000/XP/2003)[beginUnInsPrompt] is the section indicated in BeginPrompt command under "DefaultUninstall" section[BeginUnInsPrompt]Title = %ProductName% UninstallerPrompt = %UnInsPrompt%ButtonType = YESNO ;<- YESNO or OKCANCThis opens a windows before removal starts, prompting if you want to proceed or not: if you click on YES removal starts, if you click on NO removal is aborted.[EndUnInsPrompt] is the section indicated in EndPrompt command under "DefaultUninstall" section[EndUnInsPrompt]Prompt = %EndUnInsPrompt%This opens a windows at the end of removal process, informing if removal has been successful or not, etc.[DefaultInstall] is the section which starts when installation is manually run clicking on inf file. [DefaultInstall]BeginPrompt = BeginInstPromptCopyFiles = @DSCP.infAddReg = DSCP.Reg.Add.Values, DSCP.Add.Reg.ARPUpdateInis = Update.SysocEndPrompt = EndInstPromptAbout command CopyFiles http://msdn.microsoft.com/en-us/library/ff546346%28v=VS.85%29.aspxWarning! According to inf file rules, if no section name has been indicated in installation command, DXIntegrator always search for DefaultInstall section, and if found customizes and installs it, for example if in entries.ini you use these lines[SysPrepOC]DSCP=advpack.dll,LaunchINFSection,DSCP.infthen DXIntegrator search inside DSCP.inf file DefaultInstall section and customizes and installs it[update.Sysoc] is the section indicated in UpdateInis command under "DefaultInstall" section[Update.Sysoc]%17%\OCSysPrep.inf,"Components",,"DSCP=advpack.dll,LaunchINFSection,DSCP.inf,DSCP"This section adds the component in [Components] section in %WinDir%\inf\OCSysPrep.inf (as SYSOC does in Windows 2000/XP/2003)[beginInstPrompt] is the section indicated in BeginPrompt command under "DefaultInstall" section[BeginInstPrompt]Title = %ProductName% UninstallerPrompt = %InstPrompt%ButtonType = YESNO ;<- YESNO or OKCANCThis opens a windows before installation starts, prompting if you want to proceed or not: if you click on YES installation starts, if you click on NO installation is aborted.[EndInstPrompt] is the section indicated in EndPrompt command under "DefaultInstall" section[EndInstPrompt]Prompt = %EndInstPrompt%This opens a windows at the end of installation process, informing if installation has been successful or not, etc.[strings] - http://msdn.microsoft.com/en-us/library/ff547485%28v=VS.85%29.aspxis the section where you can place the variables used in your inf fileThese are the main options but inf file have endless possibilities. For further information follow Microsoft GuidesINF Sections - http://msdn.microsoft.com/en-us/library/ff547465%28v=VS.85%29.aspxINF commands - http://msdn.microsoft.com/en-us/library/ff547388%28v=VS.85%29.aspxAdding an entries.ini file created as usual, now you can create with your inf file a .cab Addon using CabTool http://www.eng2ita.net/forum/index.php/topic,6628.0.htm Here is a windows 7 registry tweaks collection http://www.eng2ita.net/forum/index.php/topic,6164.0.html (italian)and here are some sample addons (italian):DMD Windows 7 Raccolta Tweak di registro True AddOn Update (March 23-2011)Hash MD5 F103C39522A8D64A29E8F5603AFE5210Filesize: 6.77 KB (6942 bytes)DMD Abilita visualizzazione .mkv in MediaCenter True AddOn Update (March 23-2011)Hash MD5 ECF5893C528E3093857CCDF393F26554Filesize: 4.00 KB (4102 bytes)DMD Aggiungere comandi COPIA e SPOSTA True AddOn Update (March 23-2011)Hash MD5 859956469C3C264698AD2E2FDC668EBDFilesize: 3.07 KB (3144 bytes)DMD Apertura Menu rapidi True AddOn Update (March 23-2011)Hash MD5 5F60D1A500C7D87709EC2CF14D2BB477Filesize: 2.89 KB (2964 bytes)DMD Apparizione cestino in esplora risorse True AddOn Update (March 23-2011)Hash MD5 FD20BEBC067AB9A15BB999BCA9A6EA3FFilesize: 2.98 KB (3058 bytes)DMD Disattiva il servizio compatibilità programmi True AddOn Update (March 23-2011)Hash MD5 38AC0AD68FE1A029FF8B4C79750F56C6Filesize: 2.93 KB (3002 bytes)DMD Impostazioni dei Valori UAC True AddOn Update (March 23-2011)Hash MD5 740D25D741A25A0B7AA1FEF2405BA169Filesize: 3.25 KB (3330 bytes) Edited April 30, 2011 by nonno fabio Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.