[Templates] Custom Addon Templates for WINNT True Integrator

Windows 7 Update Pack discussion.
Post Reply
RP
Posts: 64
Joined: Tue Jan 01, 2008 4:00 pm

[Templates] Custom Addon Templates for WINNT True Integrator

Post by RP » Fri Jun 24, 2011 12:08 am

Integrating Fonts in WINNT True Integrator

Here's a template for integrating extra fonts into your Windows 7 Setup using WINNT True Integrator. Simply adapt this entries.ini template and pack it and your fonts files into a .CAB archive with the word "addon" in the filename. This addon template is not uninstallable in the Integrator.


The sample below is the one I use to integrate Helvetica into my Win7 installation. Customize it as shown to integrate any font and as many fonts as you need.

Code: Select all

[general]
title = Additional Fonts
description = Additional fonts installation: Helvetica
version = 3.5a3
builddate = 06/23/2011
releasetype = True Addon

[GlobalOffLineChanges.Install.ntx86]
CopyFiles = Fonts.Files

[GlobalOffLineChanges.Install.ntamd64]
CopyFiles = Fonts.Files
AddReg = Fonts.x64.AddReg

[SourceDisksNames]
1 = "Additional fonts installation",,,

[SourceDisksFiles]
helv.ttf=1
helvbold.ttf=1

[DestinationDirs]
Fonts.Files = 20

[Fonts.Files]
helv.ttf
helvbold.ttf

[TweaksAddReg]
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts","Helvetica (TrueType)",0x0,"helv.ttf"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts","Helvetica Bold (TrueType)",0x0,"helvbold.ttf"

[Fonts.x64.AddReg]
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts","Helvetica (TrueType)",0x0,"helv.ttf"
HKLM,"SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts","Helvetica Bold (TrueType)",0x0,"helvbold.ttf"
This copies the font files to the Windows\Fonts folder and does the needed registry entries. Simply stick in your own fonts' filenames, however many there are, in the [SourceDisksFiles], and [Fonts.Files] sections. And then overwrite your font's name and filename in Line 1 of the [TweaksAddReg] section, repeating that same line's syntax for each additional font.

x64 installs require a second almost identical registry entry under the SOFTWARE\Wow6432Node section. Duplicate each entry you put in from the [TweaksAddReg] section under [Fonts.x64.AddReg], only under that Wow6432Node key as shown. This entries.ini is set up for both x86 and x64 platforms, and will only install the x64 keys on an x64 Windows setup.
Last edited by RP on Fri Jun 24, 2011 12:42 am, edited 2 times in total.

RP
Posts: 64
Joined: Tue Jan 01, 2008 4:00 pm

Post by RP » Fri Jun 24, 2011 12:09 am

Registering Control Panels (and other simple tasks) in WINNT True Integrator Addons

Here's a short guide showing how to do simple WINNT True Integrator addons using just an entries.ini file for simple file copy and registry entries, using examples of registering Control Panels. Same principles apply here if you're just doing plain file copies (say, in lieu of setting up $OEM% folders), applying reg tweaks, or other assorted simple functions supported by the Integrator's subset INF functionality in its entries.ini's. The guide also shows you how to handle dual x86 + x64 CPL registration addons and get them working on both platforms.

Note that these are not uninstallable in the Integrator because they are just entries.ini addons.

----------------------------------------------------------------------------------------------------

Example #1: Simple CPL Registration for internal Windows program

Code: Select all

[general]
title = Registry Editor CPL
description = Adds Registry Editor to Control Panel
builddate = 06/23/2011
releasetype = True Addon

[TweaksAddReg]
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"",,0x0,"%CPL_Name%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","InfoTip",0x0,"%CPL_Tip%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","System.ControlPanel.Category",0x0,"%CPL_Category%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\DefaultIcon",,0x0,"%CPL_Icon%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\ShellFolder","Attributes",0x10001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%"",,0x0,"%CPL_Name%"

[Strings]
CPL_Name = "Registry Editor"
CPL_Tip = "Add and edit registry keys and values, restore the registry from a backup or to default values, and import or export keys for reference or backup."
CPL_Category = 5
CPL_CmdLine = "%SystemRoot%\regedit.exe"
CPL_Icon = "%SystemRoot%\regedit.exe,-100"
CPL_CLSID = {2d805cd4-85e6-44ad-bb3c-4711941d0ec8}
The reg entries shown are universal for registering CPL's, so you can just change the strings. If doing just a misc collection of reg tweaks, the Integrator can also call a "[TweaksDelReg]" section usable for deleting reg entries similar to the INF DelReg directive.

----------------------------------------------------------------------------------------------------

Example #2a: CPL registration with file copy

Code: Select all

[general]
title = DirectX Properties Control Panel
description = Control Panel for changing properties for DirectX.
version = 9.29.1962.0
company = Microsoft Corporation
builddate = 06/23/2011
releasetype = True Addon

[GlobalOffLineChanges.Install]
CopyFiles = DirectXCPL.Files

[SourceDisksNames]
1 = "DirectX CPL",,,

[SourceDisksFiles]
dxcpl.exe=1

[DestinationDirs]
DirectXCPL.Files = 11

[DirectXCPL.Files]
dxcpl.exe

[TweaksAddReg]
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"",,0x0,"%CPL_Name%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","InfoTip",0x0,"%CPL_Tip%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","System.ControlPanel.Category",0x0,"%CPL_Category%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\DefaultIcon",,0x0,"%CPL_Icon%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\ShellFolder","Attributes",0x10001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%"",,0x0,"%CPL_Name%"

[Strings]
CPL_Name = "DirectX Properties"
CPL_Tip = "Changes properties for DirectX."
CPL_CmdLine = "%SystemRoot%\System32\dxcpl.exe"
CPL_Icon = "%SystemRoot%\System32\dxcpl.exe"
CPL_Category = "2"
CPL_CLSID = {262dcacb-cd4b-4ee0-88fb-792ffa1af36e}
Same as Example #1, except we call the Integrator's [GlobalOfflineChanges.Install] section and perform a file copy operation (using the regular INF [SourceDiskFiles], [SourceDisksNames], [DestinationDirs], and [__.Files] sections). You can use this if you're customizing for just your x86 or x64 platform and don't care if the addon is compatible with both. Compress the entries.ini with your files into a single .CAB archive.

----------------------------------------------------------------------------------------------------

Example #2b: CPL registration with dual-platform file copy

Code: Select all

[general]
title = DirectX Properties Control Panel
description = Control Panel for changing properties for DirectX.
version = 9.29.1962.0
company = Microsoft Corporation
builddate = 06/23/2011
releasetype = True Addon

[GlobalOffLineChanges.Install.ntx86]
CopyFiles = DirectXCPL.x86.Files

[GlobalOffLineChanges.Install.ntamd64]
CopyFiles = DirectXCPL.x86.Files, DirectXCPL.x64.Files

[SourceDisksNames]
1 = "DirectX CPL",,,

[SourceDisksFiles]
dxcpl_x64.exe=1
dxcpl_x86.exe=1

[DestinationDirs]
DirectXCPL.x86.Files = 16425
DirectXCPL.x64.Files = 11

[DirectXCPL.x86.Files]
dxcpl.exe,dxcpl_x86.exe

[DirectXCPL.x64.Files]
dxcpl.exe,dxcpl_x64.exe

[TweaksAddReg]
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"",,0x0,"%CPL_Name%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","InfoTip",0x0,"%CPL_Tip%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","System.ControlPanel.Category",0x0,"%CPL_Category%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\DefaultIcon",,0x0,"%CPL_Icon%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\ShellFolder","Attributes",0x10001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%"",,0x0,"%CPL_Name%"

[Strings]
CPL_Name = "DirectX Properties"
CPL_Tip = "Changes properties for DirectX."
CPL_CmdLine = "%SystemRoot%\System32\dxcpl.exe"
CPL_Icon = "%SystemRoot%\System32\dxcpl.exe"
CPL_Category = "2"
CPL_CLSID = {262dcacb-cd4b-4ee0-88fb-792ffa1af36e}
Same as #2a, but we have platform-specific "[GlobalOfflineChanges.Install]" sections and two sets of files (appended with "_x86" and "_x64" in the source, but re-named when copied back to its original name). The reg entries are universal, but on x64 platforms the x86 file goes in SysWOW64 and the x64 file in system32 while on x86 it's just the x86 file going to system32 with the non-applicable x64 file left uninstalled. DirID 16425 ensures that the x86 file will go to system32 if it's an x86 platform, and to SysWOW64 if it's an x64 platform. DirID 16426 serves similar function for Program Files, ensuring that x86 files go to "Program Files (x86)" on x64 platforms and to regular "Program Files" on x86 platforms.

----------------------------------------------------------------------------------------------------

Example #2c: CPL registration with x86-native file copy and dual-platform registry

Code: Select all

[general]
title = DirectX Properties Control Panel
description = Control Panel for changing properties for DirectX.
version = 9.29.1962.0
company = Microsoft Corporation
builddate = 06/23/2011
releasetype = True Addon

[GlobalOffLineChanges.Install.ntx86]
CopyFiles = DirectXCPL.Files
AddReg = DirectXCPL.x86.AddReg

[GlobalOffLineChanges.Install.ntamd64]
CopyFiles = DirectXCPL.Files
AddReg = DirectXCPL.x64.AddReg

[SourceDisksNames]
1 = "DirectX CPL",,,

[SourceDisksFiles]
dxcpl.exe=1

[DestinationDirs]
DirectXCPL.Files = 16425

[DirectXCPL.Files]
dxcpl.exe

[TweaksAddReg]
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"",,0x0,"%CPL_Name%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","InfoTip",0x0,"%CPL_Tip%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","System.ControlPanel.Category",0x0,"%CPL_Category%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\ShellFolder","Attributes",0x10001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%"",,0x0,"%CPL_Name%"

[DirectXCPL.x86.AddReg]
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine.x86%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\DefaultIcon",,0x0,"%CPL_Icon.x86%"

[DirectXCPL.x64.AddReg]
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine.x64%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\DefaultIcon",,0x0,"%CPL_Icon.x64%"

[Strings]
CPL_Name = "DirectX Properties"
CPL_Tip = "Changes properties for DirectX."
CPL_Category = "2"
CPL_CmdLine.x86 = "%SystemRoot%\System32\dxcpl.exe"
CPL_Icon.x86 = "%SystemRoot%\System32\dxcpl.exe"
CPL_CmdLine.x64 = "%SystemRoot%\SysWOW64\dxcpl.exe"
CPL_Icon.x64 = "%SystemRoot%\SysWOW64\dxcpl.exe"
CPL_CLSID = {262dcacb-cd4b-4ee0-88fb-792ffa1af36e}
Same as above, but this assumes we have just an x86 file and want to install it in the right place whether you're on an x86 or x64 platform. Same file copy operation as #2b, with DirID 16425 slotting it in the right place for either platform. But the reg entries are split into 3 sections: [TweaksAddReg] for universal registration, and two platform-specific sections called out by the [GlobalOffLineChanges.Install] sections using the regular INF AddReg directive. Here we cut/paste out the reg lines for the .EXE launcher and icon entries from [TweaksAddReg] into the platform-specific reg sections and customize each to point to system32 on x86 platforms and SysWOW64 on x64 platforms. Note that if you want to use DirID's directly in the reg entry pathnames, you cannot use strings (DirID's don't expand properly from strings, so you'd have to manually paste the file/icon path into the reg lines). This is often preferable because using DirID 16425 saves having to separate out the AddReg sections like this, but if you want to keep it clean and only have to touch the strings this template works best.

----------------------------------------------------------------------------------------------------

Other info...

The reg line for launching the CPL can include arguments. For example, if you're launching UserPasswords2 the "CPL_CmdLine" string would be: "%SystemRoot%\system32\control.exe userpasswords2". And so on (RUNDLL32.EXE if you're launching a DLL, etc.).

Each CPL you register needs its own unique GUID/CLSID, which you can generate here: http://www.guidgenerator.com/. If registering multiple CPL's in one addon you may want to do away with the strings and just manually copy each set of reg entries whole. Or you can template the reg syntax and just append a suffix on each string both in the reg entries and in the strings...i.e. . .

Code: Select all

HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"",,0x0,"%CPL_Name1%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"","InfoTip",0x0,"%CPL_Tip1%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"","System.ControlPanel.Category",0x0,"%CPL_Category1%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"\DefaultIcon",,0x0,"%CPL_Icon1%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"\Shell",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"\Shell\Open",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine1%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID1%"\ShellFolder","Attributes",0x10001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID1%""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID1%"",,0x0,"%CPL_Name1%"
;
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"",,0x0,"%CPL_Name2%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"","InfoTip",0x0,"%CPL_Tip2%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"","System.ControlPanel.Category",0x0,"%CPL_Category2%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"\DefaultIcon",,0x0,"%CPL_Icon2%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"\Shell",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"\Shell\Open",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine2%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID2%"\ShellFolder","Attributes",0x10001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID2%""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID2%"",,0x0,"%CPL_Name2%"

[Strings]
CPL_Name1 = "Registry Editor"
CPL_Tip1 = "Add and edit registry keys and values, restore the registry from a backup or to default values, and import or export keys for reference or backup."
CPL_Category1 = 5
CPL_CmdLine1 = "%SystemRoot%\regedit.exe"
CPL_Icon1 = "%SystemRoot%\regedit.exe,-100"
CPL_CLSID1 = {2d805cd4-85e6-44ad-bb3c-4711941d0ec8}
;
CPL_Name2 = "DirectX Properties"
CPL_Tip2 = "Changes properties for DirectX."
CPL_CmdLine2 = "%SystemRoot%\System32\dxcpl.exe"
CPL_Icon2 = "%SystemRoot%\System32\dxcpl.exe"
CPL_Category2 = "2"
CPL_CLSID2 = {262dcacb-cd4b-4ee0-88fb-792ffa1af36e}
The "System.ControlPanel.Category" line sets where the CPL appears in Category view:
0 : Other Control Panel Options (any tool that does not specify a category ID is placed in this category)
1 : Appearance and Themes
2 : Printers and Other Hardware
3 : Network and Internet Connections
4 : Sounds, Speech, and Audio Devices
5 : Performance and Maintenance
6 : Date, Time, Language, and Regional Options
7 : Accessibility Options
Last edited by RP on Fri Jun 24, 2011 12:38 am, edited 1 time in total.

RP
Posts: 64
Joined: Tue Jan 01, 2008 4:00 pm

Post by RP » Fri Jun 24, 2011 12:37 am

Switchless installer entries.ini's

It's ridiculously easy to integrate switchless installers in WINNT Integrator. All it requires is a very short entries.ini, and a subfolder in your addon folder called "SVCPACK" that holds the installer EXE. Compress it all into a CAB file, with your CAB archiver set to compress the SVCPACK subfolder inside your CAB (won't work unless the archiver recurses the subfolders).


Here's an entries.ini file I use to install Kels' Java switchless (http://www.ryanvm.net/forum/viewtopic.php?t=3850)

Code: Select all

[general]
title = Java Runtime Environment
description = Java Runtime Environment (x86) switchless installer
version = 6.0 Update 25
company = Oracle
builddate = 06/23/2011
releasetype = SVCPACK Addon

[AddProgram]
java6u25.exe
That's it!

----------------------------------------------------------------------------------------------------

Dual-mode RVM Integrator and WINNT Integrator SVCPACK addons

Now, if you want to do a SVCPACK addon that works in both WINNT Integrator and RVM Integrator, this is all you need to use:

Code: Select all

[general]
title = Java Runtime Environment
description = Java Runtime Environment (x86) switchless installer
version = 6.0 Update 25
company = Oracle
builddate = 06/23/2011
releasetype = SVCPACK Addon

[EditFile]
I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram

[AddProgram]
java6u25.exe
WINNT Integrator ignores the [EditFile] section that RVM Integrator looks for, and RVM Integrator ignores the "releasetype" field in [General].

----------------------------------------------------------------------------------------------------

Platform-specific SVCPACK addons

If you're integrating an x64-only switchless, here's what you'd use:

Code: Select all

[general]
title = Java Runtime Environment
description = Java Runtime Environment (x64) switchless installer
version = 6.0 Update 25
company = Oracle
builddate = 06/23/2011
releasetype = SVCPACK Addon
processorarchitecture = x64

[EditFile]
AMD64\SVCPACK.INF,SetupHotfixesToRun,AddProgram

[AddProgram]
Sun Java Runtime Environment 6.0 Update 25 (64-bit) Silent.exe
This integrates n0ak's x64 Java switchless (http://www.ryanvm.net/forum/viewtopic.php?t=8958. The "processorarchitecture" WINNT Integrator-only field is added to [General] and the RVMI-specific syntax is changed to support XP x64 dual installs. In the rare case you'd want to restrict an x86 installer to running only on x86, you can also specify "processorarchitecture = x86".

----------------------------------------------------------------------------------------------------

Note that the [AddProgram] section supports spaces. It can also support any arguments that go along with the filename if needed. If your addon requires running multiple switchlesses in sequence, simply add each additional EXE on its own line under [AddProgram] and the Integrator(s) will execute them in sequence.

RP
Posts: 64
Joined: Tue Jan 01, 2008 4:00 pm

Post by RP » Fri Jun 24, 2011 7:30 am

Mixed True and SVCPACK Addon

It's possible in WINNT Integrator to have an entries.ini that both does true integration and launches a SVCPACK switchless installer. Here we take one of the CPL samples from the previous post and install Kels' Win7 CPL Pack switchless collection of other CPL's together in the same addon:

Code: Select all

[general]
title = DirectX Properties Control Panel and Kels' Win7 CPL Pack
description = Various control panels for Windows 7 x64.
version = DirectX CPL 9.29.1962.0 / Kels' Win7 CPL Pack 4.0.2
company = Microsoft Corporation / Kelsenellenelvian
builddate = 06/23/2011
releasetype = True Addon
processorarchitecture = x64

[GlobalOffLineChanges.Install.ntx86]
CopyFiles = DirectXCPL.x86.Files

[GlobalOffLineChanges.Install.ntamd64]
CopyFiles = DirectXCPL.x86.Files, DirectXCPL.x64.Files

[SourceDisksNames]
1 = "DirectX CPL",,,

[SourceDisksFiles]
dxcpl_x64.exe=1
dxcpl_x86.exe=1

[DestinationDirs]
DirectXCPL.x86.Files = 16425
DirectXCPL.x64.Files = 11

[DirectXCPL.x86.Files]
dxcpl.exe,dxcpl_x86.exe

[DirectXCPL.x64.Files]
dxcpl.exe,dxcpl_x64.exe

[TweaksAddReg]
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"",,0x0,"%CPL_Name%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","InfoTip",0x0,"%CPL_Tip%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"","System.ControlPanel.Category",0x0,"%CPL_Category%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\DefaultIcon",,0x0,"%CPL_Icon%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open",,0x10
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\Shell\Open\Command",,0x20000,"%CPL_CmdLine%"
HKLM,"SOFTWARE\Classes\CLSID\%CPL_CLSID%"\ShellFolder","Attributes",0x10001,00,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\%CPL_CLSID%"",,0x0,"%CPL_Name%"

[AddProgram]
Kels_CPLBonus_Win7_v4.0.2.exe

[Strings]
CPL_Name = "DirectX Properties"
CPL_Tip = "Changes properties for DirectX."
CPL_CmdLine = "%SystemRoot%\System32\dxcpl.exe"
CPL_Icon = "%SystemRoot%\System32\dxcpl.exe"
CPL_Category = "2"
CPL_CLSID = {262dcacb-cd4b-4ee0-88fb-792ffa1af36e}
Syntax is 100% identical to Example #2b in the CPL registration post above, only we've added an [AddProgram] that launches Kels' switchless. Note that because the switchless is x64 only the "processorarchitecture = x64" line has also been inserted in [general] to prevent the addon from being erroneously installed on an x86 platform. You'd then create the SVCPACK subfolder in your addon parent folder, stick the entries.ini and the files called in the true addon fields (i.e. dxcpl_x86.exe and dxcpl_x64.exe) into the parent folder, stick the switchless EXE in SVCPACK, and CAB it all up (making sure your CAB maker is set to recurse subdirectories).

You can use something like this to make one multipurpose addon that mashes together a whole variety of things you want installed unattended on your system.

jsp
Posts: 165
Joined: Sat Jan 21, 2006 12:39 am

Post by jsp » Thu Oct 27, 2011 2:41 am

Lots of thanks for this valuable information.

User avatar
bphlpt
Posts: 1333
Joined: Sat Apr 19, 2008 1:11 am

Post by bphlpt » Thu Oct 27, 2011 4:37 am

RP wrote:Note that because the switchless is x64 only the "processorarchitecture = x64" line has also been inserted in [general] to prevent the addon from being erroneously installed on an x86 platform.
I'm confused. Probably a dumb question, but Kel's thread doesn't mention that Win7 CPL PacK v4.0.2 is x64 only. What am I missing?

EDIT: Maybe you were thinking of this one - http://www.ryanvm.net/forum/viewtopic.php?t=8376 - (Win7 x64 CPL PacK v3.2)?

Cheers and Regards

Post Reply