RegBin plug-in: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library) |
m (Write arbitrary sized, runtime assigned binary data to Registry moved to RegBin plug-in) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{PageAuthor|Iceman_K}} | |||
== Links == | == Links == | ||
<attach>RegBin.zip</attach> | |||
== Description == | == Description == | ||
Line 47: | Line 49: | ||
Coded by Sunil Kamath, aka [[user:iceman_k|iceman_k]]/[[user:icemank|icemank]] | Coded by Sunil Kamath, aka [[user:iceman_k|iceman_k]]/[[user:icemank|icemank]] | ||
[[Category:Plugins]] |
Latest revision as of 14:57, 27 December 2005
Author: Iceman_K (talk, contrib) |
Links
RegBin.zip (7 KB)
Description
Writes an arbitrarily large binary value (which can be set at runtime) to the Windows Registry.
This overcomes two shortcomings of the standard WriteRegBin command:
- Binary values have to specified at compile-time.
- Maximum size of the value is 511 bytes.
See Example.nsi for a usage example.
Usage
- Call writeRegBin to write the data in one step. Max value size is 511 bytes.
- Call init to initialize the registry information and the buffer.
- Call append to add to the buffer.
- Optional - repeat steps 3 to append as many times as desired.
- Call write to write the data to the registry.
Notes
- init and append functions MUST be called with /NOUNLOAD so that the buffer does not get lost.
- This plugin requires NSIS 2.0b3 and above.
- All functions return "success" and "error" on success and error, respectively (duh!).
Available Functions
- init root_key subkey valuename valuedata
- root_key must be one of:
- HKCR or HKEY_CLASSES_ROOT
- HKLM or HKEY_LOCAL_MACHINE
- HKCU or HKEY_CURRENT_USER
- HKU or HKEY_USERS
- HKCC or HKEY_CURRENT_CONFIG
- HKDD or HKEY_DYN_DATA
- HKPD or HKEY_PERFORMANCE_DATA
- valuedata is in hexadecimal (e.g. DEADBEEF01223211151).
- root_key must be one of:
- append valuedata
- See init for valuedata description.
- write valuedata
- valuedata is in hexadecimal (e.g. DEADBEEF01223211151).
- writeRegBin root_key subkey valuename valuedata
- See init for parameters description.