Amish's blog

Saturday, November 11, 2006

How to set REG_BINARY data by registrar scripts

The ATL Registrar provides IRegistrar COM interface to access system registry. The Registrar is free-threaded and allows static linking of code for C++ clients. User
has to create .rgs file using BNF Syntax. The BNF Syntax is very well explain in the MSDN. I don't find any example for binary data, so here is the sample script to add/modify binary data in registry

This creates test key under HKLM\Software key. Then it crates
Foo variable with REG_BINARY value 0x23, aka 23 00 00 00 00 00 00 00

HKLM
{
NoRemove Software
{
Remove 'test' = s ''
{
val Foo = b '2300000000000000'
}
}
}

0 Comments:

Post a Comment

<< Home