A
plugin .inf file must be an ascii file, not unicode. Lines starting with a
";" (semicolon) are ignored (used for comment).
Every plugin file should start with the lines shown below:
; PE Builder v3 plug-in INF file
; Created by Bart Lagerweij
; http://www.nu2.nu/pebuilder/
; Short description of that the plugin does...
[Version]
Signature= "$Windows NT$"
[PEBuilder]
Name="NiceNameOfPlugin"
Enable=0
Help="pehelp.htm"
You
should change the name, url and other settings, this is just an example...
Please
note that you must include the [Version] Signature= "$Windows NT$" information. Otherwise
the setupapi functions cannot open the .inf file. Please use the information
below to add more section to your plugins...
Section
WinntDirectories is in the following format:
directoryID=dirname[, attribute]
where...
directoryID |
is the directory number (id) |
dirname |
is the name of the directory. If the name contains spaces put double
quotes "around it". |
attribute |
numeric value to enable/disable some options |
Example:
[WinntDirectories]
; Always create a folder in the root called "Bart"
a="Bart",3
; Create a folder in the root called "Project\Bart\Source"
b="Project\Bart\Source",3
; Create a folder in the i386 directory called "extra\files"
c="extra\files",1
Here is a list of the (most used) directories ID's:
ID |
Directory |
Remark |
30000 |
[root] |
PE Builder output root |
1 |
\ |
SystemRoot (on CD this is the \i386 folder, on hd this is the \minint
folder) |
2 |
system32 |
|
3 |
system32\config |
|
4 |
system32\drivers |
|
5 |
system |
|
17 |
system32\drivers\etc |
|
20 |
inf |
|
21 |
Help |
|
22 |
Fonts |
|
24 |
msagent\intl |
|
52 |
msagent |
|
124 |
WinSxS |
|
125 |
WinSxS\Manifests |
|
252 |
WinSxS\Policies |
|
PE Builder uses directory id's starting from 30000. Where id 30000 is used for the
output root directory. 30001 and up are dynamically used by PE Builder.
SourceDisksFiles[.build]
The
section SourceDisksFiles uses the following format:
filename=directoryID[, filenameRenamed][,
attribute]
where...
filename |
is the file to copy. |
directoryID |
is the target directory number. See WinntDirectories section for a list of standard
windows directory id's. |
filenameRenamed |
is the target filename if renaming is needed. |
attribute |
numeric value to enable/disable some options |
SourceDisksFolders[.build]
The section SourceDisksFolders uses the following format:
sourcepath=directoryID
where...
sourcepath |
is the source path/folder to copy from. This is an exact copy nothing
is decompressed or extracted! |
directoryID |
is the target directory number. See WinntDirectories section for a list of standard
windows directory id's. |
Example:
[WinntDirectories]
a="Programs\openoffice",2
[SourceDisksFolders]
; when openoffice folder is in plugin directory
openoffice=a
[SourceDisksFolders]
; when openoffice folder is at c:\
c:\openoffice=a
Software.AddReg[.build]
Add registry keys to the "Software" registry hive. This section is in
the following format:
regType, regKey, regValue, regData
where...
regType |
specifies the type of information to be stored as the value’s data.
This parameter can be one of the following values: |
regKey |
specifies the name of the key as string. |
regValue |
specfies the name of the value as string. |
regData |
The actual data. |
Example:
0x1, "Microsoft\Windows NT\CurrentVersion\Fonts", "Tahoma (TrueType)","TAHOMA.TTF"
0x2, "Control Panel\desktop", "WallPaper", "%systemroot%\system32\nu2.bmp"
0x3, "ControlSet001\Control\TimeZoneInformation", "DaylightStart",\
00,00,04,00,00,01,00,02,00,00,00,00,00,00,00,00
0x4, "ControlSet001\Control\GraphicsDrivers\DCI", "Timeout", 0x7
0x7, "ControlSet001\Services\VgaSave\Device0", "InstalledDisplayDrivers","vga", "framebuf", "vga256", "vga64k"
SetupReg.AddReg[.build]
Add registry keys to the "SetupReg.hiv" registry hive. Same syntax as
Software.AddReg
Default.AddReg[.build]
Add registry keys to the "Default" registry hive. Same syntax as Software.AddReg
Software.DelReg[.build]
Delete registry keys from the "Software" registry hive. This section
is in the following format: regKey[,
regValue]
where...
regKey |
specifies the name of the key (including all values) to delete as
string. |
regValue |
specifies the name of the value to delete as string. |
Default.DelReg[.build]
Delete registry keys from the "Default" registry hive. Same syntax as
Software.DelReg
AddLine[.build]
The lines in the AddLine section have the following format:
Filename,Section,StringToAdd
where...
Filename |
is the filename to add a line to. |
Section |
is the sectionname. |
StringToAdd |
is the line/string to add. |
Sample:
"netmscli.inf", "MSClient.DelReg", "HKLM, Software\Microsoft\Rpc\SecurityService,
9"
DelLine[.build]
The lines in the DelLine section have the following format:
Filename,Section,StringToDel
where...
Filename |
is the filename to add a line to. |
Section |
is the sectionname. |
StringToDel |
is the line to delete. You don't have to match exact, any lines
begining with StringToDel will be deleted. |
Sample:
"netmscli.inf", "MSClient.Browser.AddReg", "HKR,
Parameters, MaintainServerList,"
SetValue[.build]
The lines in the SetValue section have the following format:
Filename,Section,Key,Value
where...
Filename |
is the filename to set a value in. |
Section |
is the sectionname. |
Key |
is the key to assign a value to. |
Value |
is the data. |
Sample:
"netmscli.inf", "Alerter_Service_Inst",
"StartType", "3"
Use Filename,Section,Key to remove a key
Use Filename,Section to remove a complete
section
Append[.build]
The lines in the Append section have the following format:
Filename,FilenameToAppend
where...
Filename |
is the file where data will be appended. |
FilenameToAppend |
is the file that contain the data to append. |
Sample:
nu2menu.xml, penero_nu2menu.xml