You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create binary registry value with data '0x00', but xRegistry resource set none value.
Detail
I want to create binary reg value with data zero
For that, write and exec psdsc configuration like...
xRegistry Zero_RegBinary
{
Ensure ="Present"
Key ="HKEY_LOCAL_MACHINE\SYSTEM\Tests"
ValueName ="TestValue"
ValueData ="0x00"# same result if you set ValueData="0",
ValueType ="Binary"
}
Then, sadly, xRegistry resource create a reg value that has 'zero-length binary value'
I confirmed the issue also have the In-box Regisrtry resource in Windows 10 1607.
Apparently the code is intended to remove the first '0x' of $Data[0].
but if $Data[0] = '0' or '0x00', empty value is set in $val.
Perhaps this is undesired behavior.
I would like to propose to modify the code like...
Description
I want to create binary registry value with data '0x00', but xRegistry resource set none value.
Detail
I want to create binary reg value with data zero
For that, write and exec psdsc configuration like...
Then, sadly, xRegistry resource create a reg value that has 'zero-length binary value'
I confirmed the issue also have the In-box Regisrtry resource in Windows 10 1607.
How to fix
I've discovered the issue caused by this code.
Apparently the code is intended to remove the first '0x' of $Data[0].
but if $Data[0] = '0' or '0x00', empty value is set in $val.
Perhaps this is undesired behavior.
I would like to propose to modify the code like...
It's a little redundant, but I think it is easy to understand and behave properly.
The text was updated successfully, but these errors were encountered: