(Untitled)

Introduction

Most drivers have registry settings that don’t come with a user interface for you to use. These entries are meant for oems to change defaults in reference drivers, for internal trouble shooting, future functionality not yet implemented or settings removed to get Microsoft’s approval. This is not acceptable to your typical computer geek. :)

How would you like to be able to just edit a few text files or edit the registry and have a new display properties page with a gui for all the cool settings you have discovered? How about a control panel? Or integrated with Desktop Manager? Or as a standalone program running from the taskbar? You can do all four at the same time with this program.

Have a look at an example tweak page:


Legal Status

Legal

Registry Tweak Version .036 and lower are free of charge for use by individuals for non commercial application. The archive is freely distributable as long as there has been no modification of the contents without prior notification and subsequent agreement by the author.


(Untitled)

Tutorial

This is a simple run through of the process of adding a Tweak page to Registry Tweak. I will assume you know your way around regedit, if not, you will have to learn the very basics if you want to use this program. If you haven't installed Registry Tweak, a simple means of trying it out is to copy RegTwk.dll to your system directory, it should be renamed RegTwk.cpl. You don't get your page as a display properties extension unless you install Registry Tweak.
  1. First off, you have to have regedit running and open to the Registry Tweak Key:

    HKEY_CURRENT_USER\Software\Registry Tweak

    You right click on the right pane and you select New->Key, then type in: My Tweak Page.

  2. You need at least one key defined and one registry entry defined for a page to show up.

    I'll use this entry:

    HKLM\Software\Microsoft\DirectDraw\DisableAGPSupport

    Some people have found this to improve stability in their systems and others have reported speed increases. It requires a reboot to switch from on to off. In fact you might have to get rid of the value entirely to get AGP working again. We’ll just use it for an example.

    The key part is the "HKLM\Software\Microsoft\DirectDraw"bit, the value part is the "DisableAGPSupport"bit. It's a DWORD (number), it has the values 0 and 1.

    Create a New->Key called Keys and under that key a sub key called Direct Draw.

  3. We now have to define the path "HKLM\Software\Microsoft\DirectDraw".

    Create a New->DWORD and call it Root.. Right click on it and select modify, enter 80000002 as a hexidecimal number, this is a numeric constant that means HKLM.

    Create a New->String Value called Path, modify it and type in Software\Microsoft\DirectDraw.

    Create a New->DWORD called ID and give it the value 1.

    It should look like this when you are done:

    There you go, you have a new key defined, from now on you can simply use the ID value of 1 to refer to the key when adding in entries to the RegEntries section which we will do now.

  4. Ok, now you have to create a RegEntries key under My Tweak Page, select My Tweak Page and right click on the right pane and repeat the process you use earlier to create a New->Key. These two sub keys have to be spelled correctly, it's Keys and RegEntries.

    When you have that done create a key under RegEntries called Disable AGP, spelling is not critical for these labels, just the root key labels. All value names must be spelled correctly as well.

    Right now you should see something like this:

  5. You should have the hang of it a bit so continue adding fields to match this:

    KeyID refers to the Key you created, that's why it has the value 1.

    ValueName refers to the registry value that will looked for in the registry under the HKLM\Software\Microsoft\DirectDraw key.

    DisplayName refers to the text that will appear upon your tweak page.

    HighValue and LowValue refer to what value correspond to an on or off condition in the gui.

    Default refers to the value that DisableAGPSupport will have when the reset button is pressed.

    NoRegistryOnValue is a special option that will delete the DisableAGPSupport entry from the registry when you turn it off/set the value to 0.

  6. All you need do now is open your control panel and your tweak application will be there.

    Open it up and select you entry, click on the icon to turn it on and click apply. Open Regedit to HKLM\Software\Microsoft\DirectDraw and you will see a new entry called DisableAGPSupport with the value 1. If you use your tweak page to turn off the value, the Disable AGPSupport entry disappears.

    That is enough to get you started, there are many more options available, go to the Details section for more information.


(Untitled)

Tweaker Details

Glossary:

Key: | A registry key is like a folder/directory in a file system, it’s a container, it contains other keys and/or values.
Value:. | A registry value is like a file in a filesystem or variable in a programming language. It contains typed data, that is, data of a specific known type, text is text and numbers are numbers.
DWORD: | Unsigned integer consisting of 4 bytes.
STRING: | A phrase or a bit of text, has a beginning/end and an exact length in characters.

Root Key

Everything begins and ends with this registry key :

HKEY_CURRENT_USER\Software\Registry Tweak

With the latest versions, this can also be

HKEY_LOCAL_MACHINE\Software\Registry Tweak

HKCU is only accessible to a specific logged on user, HKLM is accessible to everybody given that they have administration rights

Everything the program uses for it’s data is in one of the above.

Main Key Values:

Under the root key above are the following values that can be used with Registry Tweak:

Debug [DWORD / STRING] (1 means on, 0 means off)
Strings are interpreted as hex.

(Puts RegTwkLog.txt in c:\ when it is run. The output consists of the registry entries loaded and saved during the run of the program and various events. )

Both of these below are used by RegTwk.exe, the bit that runs the systray icon.

Taskbar Icon | [STRING] | Path to an icon file, a file with an ico extension.
Taskbar Caption | [STRING] | Text that will appear in the title of the window and popup text

DisplayModes [DWORD] Controls the use of desktop display modes in the taskbar menu.

Root Sub Keys:

Sub Keys under the main root key are the root keys for each defined tweak application you implement using Registry Tweak. These can have any label you like, it’s just for your own use, each one contains the data for creating a tweak utility.

Ex.

My Tweak Utiltiy is just as valid as Bob Likes Fish

HKEY_CURRENT_USER\Software\Registry Tweak\My Tweak Utility

HKEY_CURRENT_USER\Software\Registry Tweak\Bob Likes Fish

Under each of these sub keys there are some values and even more sub keys with specific names and functionality. Each tweak page definition is totally contained under this key that you create. The basic idea is to give the program a list of Keys that will be accessed and refer to these keys by ID when defining what values under that key you want to access. It could have been set up to require that each entry specify the whole path, this is just about less typing and less program time taken up, most values you want to acces are all located under one or two keys generally anyway.

Under your new tweak page key you can add these 6 sub keys (Only the first three are required the others are optional):

HKEY_CURRENT_USER\Software\Registry Tweak\My Tweak Utility\Categories HKEY_CURRENT_USER\Software\Registry Tweak\My Tweak Utility\Keys HKEY_CURRENT_USER\Software\Registry Tweak\My Tweak Utility\RegEntries HKEY_CURRENT_USER\Software\Registry Tweak\My Tweak Utility\Colours HKEY_CURRENT_USER\Software\Registry Tweak\My Tweak Utility\Fonts HKEY_CURRENT_USER\Software\Registry Tweak\My Tweak Utility\Localization

Before you even start creating these 6 sub keys, there are some values under the main key for you to check out.:

Ex.

Details

BackgroundBitmap | [STRING] | Path to a bmp file
WatermarkBitmap | [STRING] | Path to a bmp file
SliderBitmap | [STRING] | Path to a bmp file
SliderKnobBitmap | [STRING] | Path to a bmp file
Icon | [STRING] | Path to an ico file used in the page title
ID | [DWORD / STRING] | Number Indentifier for the page, used to locate a macro when executing it without the gui.
NeedsWin9x | [DWORD / STRING] | If the tweak page only works under Win9x, turn this on.
NeedsWinNT | [DWORD / STRING] | If the tweak page only works under WinNT and above, turn this on.
NeedsWin2K | [DWORD / STRING] | If the tweak page only works under Win2K, turn this on.
NeedsWinXP | [DWORD / STRING] | If the tweak page only works under WinXP, turn this on.
IsControlPanel | [DWORD / STRING] | 1/0 enable/disable use as a control panel.
IsDisplayPropertiesPage | [DWORD / STRING] | 1/0 enable/disable use as a display properties page.
IsTaskbarPage | [DWORD / STRING] | 1/0 enable/disable use as a page in the taskbar interface.
IsDMPrefsPage | [DWORD / STRING] | 1/0 enable/disable use with Desktop Manager Strings are interpreted as hex.
SMWindow | [STRING] | Name of a window to send a message to when the user clicks apply or ok.
SMWindowClass | [STRING] | Name of a window class to use with SMWinodw to indentify the window to use.
SMMessage | [DWORD / STRING] | Message ID, like WM_APP+5. Strings are interpreted as hex.
SMRMessage | [STRING] | Name of a registered Message.
SMWParam | [DWORD / STRING] | SMMessage wParam. Strings are interpreted as hex..
SMLParam | [DWORD / STRING] | SMMessage lParam. Strings are interpreted as hex.
Helpfile | [STRING] | Path to a Window’s chm file like the one you are reading.
DefaultContextHelp | [STRING] | Popup text when the user clicks on an empty part of the tweak panel.
CloneMacroCategory | [STRING] | Default category to put cloned macros in, it's a category id number.
CloneMacroSubCategory | [STRING] | Default category to put cloned macros in relative to CloneMacroCategory, it's a category id number.
NoEntryOnValue | [DWORD / STRING] | Any registry entries using this value are deleted you set the value to this using the GUI.
AdvancedLevel | [STRING/DWORD] | Global value used for comparison with keys and regentries to sift the gui by degree.
SaveMacroAsInf | [DWORD / STRING] | Save menu item for macros will save in inf format instead of regedit format.
HasRegistryNotifications | [DWORD / STRING] | With this enabled, when something changes the registry externally, the program is notified about it and updates the gui accordingly.
HasExportAndSave | [DWORD / STRING] | Enables the use of these extra menu commands for macros.
UseWatermark | [DWORD / STRING] | 1 means use the background bitmap in the view, 0 the default system colour.
OnIcon | [STRING] | Path to an ico file, the image indicating a registry setting is enabled.
OffIcon | [STRING] | Path to an ico file, the image indicating a registry setting is disabled.
TextIcon | [STRING] | Path to an ico file, the image representing a registry entry that contains text.
NumberIcon | [STRING] | Path to an ico file, the image representing a registry entry that contains a number that isn't one of two values.
SliderIcon | [STRING] | Path to an ico file, the image representing a registry entry that contains a range of numeric values. Ex. Volume control.
NoRegIcon | [STRING] | Path to an ico file, the image representing that the registry value isn't currently stored.
EntryChangedIcon | [STRING] | Path to an ico file, the image representing that the registry value will be stored on apply.
MacroAutoRunIcon | [STRING] | Path to an ico file, the image representing the autorun state of a macro.

All of the above values are optional, they are used for overriding the default settings.

The Sub Key sections are:

Categories | List of names of subdivisions to place your tweaks in. Each Tweak you create refers to one of these categories by ID to be placed in that subdivision. A tweak without a category ID is placed in "Misc."
Keys | List of key entries you will be accessing with your registry entries. Each tweak you create refers to a key ID that tells the program where the tweak is located. Each tweak requires a key ID.
RegEntries | List of registry values you will be reading and writing to when you run the program. They are placed by category in the gui and reference one of the defined keys.
Colours | Gui element COLORREF values to change the text colours. Values are DWORDs, Control Number=0x00BBGGRR
Localization | The equivalent of a program’s resource section but just refering to the text parts, you can associate the text to use with each gui element. Control Number=Some Text

Categories

Ex.

Details

Name | [STRING] | A label used in the gui for the category.
ID | [DWORD] | A unique integer referenced by the RegEntries section. All IDs are read as hexidecimal values, so keep in mind that 10 is really 16 to the program, and AF is valid.
HasClear | [DWORD/STRING] | If there are reg entries in the category with corresponding values in the registry, with this enabled right clicking on the category will allow you to clear them all at once.
HasDefault | [DWORD/STRING] | If there are reg entries in the category that has been modified once this session, enabling this will insert a default menu item when you right click on the category that will allow you to reset all the changed entries to the defined defaults.

Keys

Ex.

Details

ID | [DWORD] | A unique integer referenced by the RegEntries section.
Root | [DWORD / STRING] | ( HKLM/HKCU/* in number form.) HKCR = 0x80000000 HKCU = 0x80000001 HKLM = 0x80000002 HKU = 0x80000003 HKR = 0x80000006 You can use the abreviations "HKLM" in place of DWORDs with the actual values. HKR is a special root that is replaced with the actual root where the program is installed.
Path | [STRING] | Route to the registry key to be used, or if the scan options are used the prefix to the final path. It also means the ini file is the IsIniFile option is used.
IsIniFile | [DWORD / STRING] | This changes the target to be an ini file instead of a registry key. Path now points to a file. Root is ignored. SectionName is required. Scan options don't apply.
SectionName | [STRING] | When IsIniFile is selected, this specifies the section name within the ini file.
NeedsWin9x | [DWORD / STRING] | If the key only exists under Win9x, turn this on. Strings are interpreted as hex.
NeedsWinNT | [DWORD / STRING] | If the tweak page only works under WinNT and above, turn this on. Strings are interpreted as hex.
NeedsWin2K | [DWORD / STRING] | If the tweak page only works under Win2K, turn this on. Strings are interpreted as hex.
NeedsWinXP | [DWORD / STRING] | If the tweak page only works under WinXP, turn this on. Strings are interpreted as hex.
AdvancedLevel | [DWORD / STRING] | An assignment of value for comparison with the global AdvancedLevel, if this value, when compared with than the global value using AdvancedLevelOperator, is not true, then all regentries based on this key will be left out of the gui. Strings are interpreted as decimal.
AdvancedLevelOperator | [DWORD / STRING] | 0 - equality [Default if not included] 1 - inequality 2 - less than 3 - greater than 4 - contains. string: If value contains constant, num: if value AND constant equals constant You can use actual C tokens instead of numbers, "==", "!=", "<", ">", and "&" respectively.
ScanKey | [STRING] | Matching sub string expression to find a paticular subkey within the above path. If the subkey has a substring within it's name matching this pattern, the subkey name is added to the path, followed by any text you add using ScanSuffix to form the complete path. Single character matching only, '?' is any character, '#' is any digit, other chars have to match but not case sensitive. A subkey called "Bob's 100th birthday" is found by "###th" ,"bob" or even "b",
ScanValue | [STRING] | If ScanKey is not specified or doesn't result in a match and this entry exists, this is the name of a value within each subkey to do further testing with using ScanText.
ScanText | [STRING] | Substring expression to search for within ScanValue’s data. See ScanKey for format of expression.
ScanSuffix | [STRING] | Extra path string to add to the end of the located entry.
DependsOnRoot | [DWORD / STRING] | See Root above.
DependsOnPath | [STRING] | Registry path.
DependsOnValue | [STRING] | DependsOnRoot, DependsOnPath and DependsOnValue locate a registry value in the same manner than a volume name like C:, a path like \windows\ and a file like winini.ini when combined locate a file.
DependsOnConstant | [DWORD / STRING] | The value referenced above is read and compared with this value according to DependsOnOperator. If the result of the comparison is true all registry entries that refer to this key are included in the gui. If the types of the values are not equal it is not added, ie. if the constant is a string and the value is a DWORD. If Constant Op Value Then Add.
DependsOnOperator | [DWORD / STRING] | 0 - equality [Default if not included] 1 - inequality 2 - less than 3 - greater than 4 - contains. string: If value contains constant, num: if value AND constant equals constant You can use actual C tokens instead of numbers, "==", "!=", "<", ">", and "&" respectively.
NoEntryOnValue | [DWORD / STRING] | Any registry entries using this key are deleted if you set the value to this using the GUI. Strings are interpreted as hex.

*All the Scan entries and DependsOn entries are optional modifiers. For key paths you can do argument substitution, put a %1 somewhere in the string and the registry value of the same name will be looked for and inserted. If the "%1" string points to a value path to a string value under HKLM, the contents of that value will be substituted. $Video1-$Video9 point to the enum registry entries for video cards in first come first serve order. $ntvga points to the evaluated vgacompatible entry under DeviceMap\Video

RegEntries

Ex.

Details

ID | [DWORD / STRING] | A unique integer used by macros. If the item is a macro then it only has to be unique among macros, macro IDs are only used for executing macros via shortcuts. Strings are interpreted as hex.
NeedsWin9x | [DWORD / STRING] | If the value only exists under Win9x, turn this on. Strings are interpreted as hex.
NeedsWinNT | [DWORD / STRING] | If the tweak page only works under WinNT and above, turn this on. Strings are interpreted as hex.
NeedsWin2K | [DWORD / STRING] | If the tweak page only works under Win2K, turn this on. Strings are interpreted as hex.
NeedsWinXP | [DWORD / STRING] | If the tweak page only works under WinXP, turn this on. Strings are interpreted as hex.
AdvancedLevel | [DWORD / STRING] | An assignment of value for comparison with the global AdvancedLevel, if this value, when compared with than the global value using AdvancedLevelOperator, is not true, then this entry will be left out of the gui. Strings are interpreted as decimal.
AdvancedLevelOperator | [DWORD / STRING] | 0 - equality [Default if not included] 1 - inequality 2 - less than 3 - greater than 4 - contains. string: If value contains constant, num: if value AND constant equals constant You can use actual C tokens instead of numbers, "==", "!=", "<", ">", and "&" respectively.
KeyID | [DWORD / STRING] | Reference to the Keys entry to use to locate the Registry Key to access. Values <= -2 are reserved special purpose keys. Strings are interpreted as hex.
ValueName | [STRING] | Name of the Registry Value to read/write.
Category | [STRING] | Section title for use with the tree view, it's a number referencing a category id.
SubCategory | [STRING] | Section title for use with the tree view, relative to Category, it's a number referencing a category id.
DisplayName | [STRING] | Text to display to the right of the icon image in the gui.
InfName | [STRING] | Used for the id field in macros when SaveMacroAsInf is enabled.
Help | [STRING] | Text to display when the user right clicks on an item. (context help)
DependsOnKey | [DWORD / STRING] | KeyID value. Strings are interpreted as hex.
DependsOnValue | [STRING] | Value name under DependsOnKey to read to use in comparison with DependsOnConstant.
DependsOnConstant | [DWORD / STRING] | The value referenced above is read and compared with this value according to DependsOnOperator. If the result of the comparison is true the entry is added to the gui. If the types of the values are not equal it is not added, ie. if the constant is a string and the value is a DWORD. If Constant Op Value Then Add.
DependsOnOperator | [DWORD / STRING] | 0 - equality [Default if not included] 1 - inequality 2 - less than 3 - greater than 4 - contains. string: If value contains constant, num: if value AND constant equals constant You can use actual C tokens instead of numbers, "==", "!=", "<", ">", and "&" respectively.
UpdateGui | [DWORD / STRING] | When you hit apply after changing the entry, the list of tweaks is updated.
SaveHive | [DWORD / STRING] | When you hit apply after changing the entry, the contents of the tweaker registry as saved back to the data file.
IsHex | [DWORD / STRING] | *Interprets string numbers as hexidecimal values, ie "8a9" instead of "543". Applies to all string values read in and converted to [and from] numbers.
NoEntryOnValue | [DWORD / STRING] | The registry entry is deleted if you set the value to this using the GUI. Strings are interpreted according to IsHex.
HighValue | [DWORD / STRING] | Value to be written to the registry when the entry is turned on. Alternatively the high end of a range. Strings are interpreted according to IsHex.
LowValue | [DWORD / STRING] | Value to to be written to the registry when the entry is turned off. Alternatively, the low end of a range. Strings are interpreted according to IsHex.
Steps | [DWORD / STRING] | Increment value for the slider in a range type. Strings are interpreted according to IsHex.
Default | [DWORD / STRING] | Value to be written to the registry when the reset button is pressed. Strings are interpreted according to IsHex.
IsStringNumber | [DWORD / STRING] | *Convert data from strings to dwords and back when reading and writing to the registry. Strings are interpreted as hex.
IsString | [DWORD / STRING] | *Registry entry contains text to be modified. Strings are interpreted as hex.
IsSwitch | [DWORD / STRING] | Modifier to IsString. Default, LowValue and HighValue are text strings. Strings are interpreted as hex.
IsPath | [DWORD / STRING] | *IsString modifier, brings up a browse dialog. Strings are interpreted as hex.
PathFilter | [STRING] | *IsPath option, default is All,*.* Format is label, comma, regular expression, repeat.
IsNumber | [DWORD / STRING] | *Registry entry contains a number to be modified, not just a binary value. Strings are interpreted as hex.
IsColour | [DWORD / STRING] | *IsNumber modifier, brings up a colour dialog. Strings are interpreted as hex.
IsKeyboard | [DWORD / STRING] | *IsNumber modifier, displays text values of virtual key codes which are stored as numbers. HIWORD is a bitmap of MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN. Strings are interpreted as hex.
IsRange | [DWORD / STRING] | *Registry entry contains a integer with a range of values appropriate for a slider. Uses LowValue, HighValue, and Steps for the slider. Strings are interpreted as hex.
LimitedRange | [DWORD / STRING] | *Modifier for IsRange, with this the HighValue, LowValue and Steps entries are ignored and instead numeric values in the registry are used as an indexed table. Strings are interpreted as hex.
ByteIndex | [DWORD] | *Used with IsRange to specify a byte in a binary registry entry. Strings are interpreted according to IsHex.
BitMask | [DWORD / STRING] | *Binary mask used with registry values that want to toggle bits. Overides Low and High values. Use with care, bitmap toggling takes place immediately without waiting for an apply. (Read value, mask it, toggle bits, save) Strings are interpreted according to IsHex.
OutputBinary | [DWORD / STRING] | *Save numbers as being of type binary. Strings are interpreted as hex.
CommandLine | [STRING] | Optional executable to run when a numeric setting is saved. By default, "%1" is replaced the value of the entry. ex: "rume.exe %1", you can add "%1" through "%9" as values in this regentry with regentry ids to substitute other values. Switches (text and numeric) use HighCommandLine and LowCommandLine instead. You separate the program from it's arguments using the '|' character, you can't enter double quotes in inf files so some other means of isolating program paths from it's arguments is required.
CLArgsAreStrings | [STRING] | Modifier for CommandLine indicating that the argument values %1-%9 are strings instead of numbers.
HighCommandLine | [STRING] | Switch version of CommandLine, used when current value is the same as HighValue.
LowCommandLine | [STRING] | Switch version of CommandLine, used when current value is the same as LowValue.
IsVirtual | [DWORD / STRING] | Applying after changing a virtual type runs a commandline if present but does not use the KeyId or the ValueName to set a value in the registry. Strings are interpreted according to IsHex.
ExecuteCommandLine | [DWORD / STRING] | Modifier to determine whether the CommandLine string is executed or not
AddToRunRegistry | [STRING] | Modifier for CommandLine, if the command executes successfully, or you set it to not run at all, it is added to the Run registry to be automatically run next time you reboot Windows. The string is used for the value name.
AddToStartup | [STRING] | Modifier for CommandLine, if the command executes successfully or you set it to not run at all, it is added as a shortcut to the Startup folder to be automatically run next time you reboot Windows. The string is used for the shortcut name.
AddToRegEntry | [DWORD / STRING] | Modifier for CommandLine. it saves the command line text to a string reg entry indicated by the ID. Strings are interpreted as hex.
RequiresReboot | [DWORD / STRING] | Indicates that changes to this entry will require a system reboot to take effect. Strings are interpreted as hex.
RequiresRestart | [DWORD / STRING] | Indicates that changes to this entry will require Windows to be restarted to take effect. Strings are interpreted as hex.
IsHidden | [DWORD / STRING] | The registry entry exists, it loads it's value and saves it, but it doesn't appear in the gui. Strings are interpreted as hex.
IsMacro | [DWORD / STRING] | *Indicates that the entry is a macro. Macros are defined by a series of RegEntries section ID values and their contents, when a macro is clicked on it sets the specified entries by ID to the values given. Ex. "1" = "1" "2" = "0" "3" = 4 Strings are interpreted as hex.
HasMenu | [DWORD / STRING] | Modifier for IsMacro, disables the context menu when set to 0. Strings are interpreted as hex.
HasSet/* | [DWORD / STRING] | Modifier for IsMacro, controls the ability of the user to SET the current setting to the macro. The rest of the context menu can be controlled this way using HasRename, HasComment, HasDelete, HasClone, HasSave and HasExport. Strings are interpreted as hex.
IsBlank | [DWORD / STRING] | Modifier for IsMacro, until the entry has been SET once it is unresponsive. Strings are interpreted as hex.
IsToggle | [DWORD / STRING] | Modifier for IsMacro. Enabled sets the macro values, disabled applies the default values. Strings are interpreted as hex.
StealthMode | [DWORD / STRING] | Modifier for IsMacro, switch icons are used. Strings are interpreted as hex.
AutoRunRoot | [DWORD / STRING] | Modifier for IsMacro. "HKLM" etc, see root entry in Keys. Forms the beginning of a path to store a command line for executing the macro externally.
AutoRunPath | [DWORD / STRING] | Modifier for IsMacro. Path to add to AutoRunRoot.
AutoRunValue | [DWORD / STRING] | Modifier for IsMacro. Value to use with AutoRunRoot and AutoRunPath
AutoRunValueEdit | [DWORD / STRING] | Modifier for IsMacro. On/off switch for editing AutoRunValue

*Trying multiple conbinations of these values is not guaranteed to produce good results or be consistant from version to version. The only exception being the use of OutputBinary with numeric values, like IsStringNumber or IsRange or the default. The default is to assume a DWORD with a 0/1 value, so if none of these are present that’s what you’ll get.

Optional text box setting using value mapping, applies to switches and range types. <Value> = "Description"

Ex.

"1" = "first"
"2" = "second"
"3" = "third"

Special KeyIDs

-2: Accesses the Global Advanced Level setting.

Colours

Details

  • "Control ID" = colour (COLORREF format, 0xBBGGRR because the PC is low endian)
  • "Default" = colour
  • "Shadow" = number, draws the groupbox titles down and to the right in a darker shade before drawing regular text, the number indicates how far down and to the right to draw the shadow.

Fonts

Details

Font | [STRING] | Valid font name, Ie: "Times New Roman"
ID | [DWORD / STRING] | A number to associate with the font definition.
FontHeight | [STRING / DWORD] | Value for the size of the font, Ie. 10
FontWeight | [STRING / DWORD] | Value for the weight of the font, Ie. 300. Runs in multiples of 100s, larger values make the font more bold.

Controls are mapped to the various fonts using the font IDs, the format used in the Controls subkey is
<control ID> = <FontID>, you can also have a "Default" = <FontID>.

"1451"="1"
"Default"="2"

Localization

Details

  • "1" is the id for the name of your tweak application in the gui.
  • "2" is the description of your tweak application for the control panel.
  • Other control strings are replaceable by using their control ids.


Setup Program

Setup Details

The setup program can be used for your own tweaker applications. It has been tested extensively with Rage3D Tweak and includes quite a lot of functionality in a small package.

Typical Cycle of Life

  • When you click on RegTweakSetup.exe, it will detect the operating system and install the RegTwk.dll file in the appropriate system directory and set the appropriate registry entries for each operating system. RegTwk.dll will also be copied over as a control panel file with the name RegTwk.cpl.
  • From there it checks for the presense of a sub folder called Tweaks and scans it for files ending in 'inf'. The Tweaker will grab information about each one, things like install sections dedicated to a paticular OS, locale ids for displaying only the inf files that match the computer's set locale, and entries for automatic uninstallation, SharedDll management, etc..
  • You are then presented with a list of tweak pages to install, depending on your tweaker, some or all of the inf files will have an entry here.
  • You click apply and you are prompted asking you to reboot. Rebooting is necessary when files have been installed that are in use, they are scheduled for copying automatically when you next reboot. This is part of the Windows operating system and the inf file API. A log of all actions taken or not taken by the setup will be created in the current directory.
  • When you use Add/Remove programs you will only see the Registry tweak entry, from there you can uninstall individual tweak pages. When all tweak pages have been uninstalled RegTweak itself is uninstalled. Again you are prompted to reboot, files in use can not be deleted, they are queued for automatic deletion upon next boot. A log of all actions taken upon uninstalltion will be left in the system directory.

Initial Display of Items

When RegTweakSetup.exe is run it scans all the inf files in the Tweaks sub directory, if no special strings or sections are present then the filename will be displayed as an option to install.
  • DescName Instead of simply listing the filename, you can include a string called DescName in the [Strings] section of you inf file and the setup program will use this as the label in the gui.

    [Strings]
    DescName="My Famous Tweaker"

  • LangIds The Windows OS has an associated language locale associated with each installation, this is a 4 digit number representing the language used by the operating system. This entry in the [Strings] section tells the setup program the intended target language of the inf file. Windows has several IDs which mean the same language but different regions, American English, Australian English etc. If this string is not present, the inf file will be added without regard for language.

    [Strings]
    ;English (commas not needed, the setup just checks for a matching substring)
    DescName="My Famous Tweaker"
    LangIds="0409, 0c09, 1009, 1409, 1809"

  • AllLangIds If you define a inf file for an English audience and an Italian audience, but someone installs from a German machine, this entry is used to set the default inf file. You list all the ids used in all your inf files in one big string and put it in any inf file that should show up if no match is found. This is different than simply leaving off LangIds, normally you want only one language listed, by leaving off LangIds you will always have that entry listed.

    [Strings]
    DescName="My Famous Tweaker"
    LangIds="0409, 0c09, 1009, 1409, 1809"
    AllLangIds="0409, 0c09, 1009, 1409, 1809, 0410"

Installation options

When you click on apply in the setup program, all the selected inf file entries will be installed according to the inf file API. The setup program will detect the current operating system and look for the install sections below first:
  • [InstallWin95]
  • [InstallWin98]
  • [InstallWinNT]
  • [InstallWin2K]
  • [InstallWinXP]

If none are found it will check for "[DefaultInstall]". A tweaker with OS specific options will have one or more of the above. A tweaker with no need to differentiate between operating systems will use DefaultInstall.

The files are copied depending on the way the inf file is structured, that is all up to you using the inf file API.

If the string "AlreadyInstalled" is present, this will be the used as the name of a registry path under HKLM. If the path exists then the entry is detected as already being installed. Typically, an inf file will put an entry under HKLM to be listed in add/remove programs, this provides a simple means of checking for it already being installed. The path to add/remove registry is the same under all versions of Windows. MS was kind that day. :)

If the string "AlreadyInstalledAlert" is present, this will be what is entered into the log when a previous install in detected for the inf file. The default will simply use the DescName or file name with "Already installed" in front of it.

If the string "RunMe" is present, it will be interpreted as a command and run like you ran it from the shell, since the syntax for inf files already has quotes around strings, if you need to run a command with arguments you can use the '|' character to separate the command from the arguments.

If the string "AddToStartup" is present, it will be interpreted as a executable name listed in a CopyFiles section. If found, a link to the actual full path as was copied will be created in the system startup folder.

If the string "AddToDesktop" is present, it will be interpreted as a executable name listed in a CopyFiles section. If found, a link to the actual full path as was copied will be created in the system desktop folder.

Note: files copied using inf files should be in 8.3 filename format to avoid additional headaches.

Uninstalling

Uninstalling should be done using the UninstallMe string, you simply specify the section name you want used when uninstalling the inf file. This is used for the tweaker to uninstall each individual tweak file and also to prevent installing more than once in the absence of "AlreadyInstalled".

[Strings]
UninstallMe="DefaultUninstall MyTwk.inf"

Shared Dlls

One thing that came up with Rage3D Tweak was the need to install dlls into the system directory and also increment the usage of that dll in the registry. This is a Windows API for managing shared dlls so that dlls are not uninstalled until all programs using the dll have been uninstalled. All you have to do is list your shared dlls under the appropriate OS specific section listed below:
  • [SharedDllsWin95]
  • [SharedDllsWin98]
  • [SharedDllsWinNT]
  • [SharedDllsWin2K]
  • [SharedDllsWinXP]
The inf file is still responsible for copying the dll file, this function is about managing the uninstall and registry maintenance. A simple solution is simply to use each SharedDllsWin* section as a copyfiles section in a matching InstallWin* install.