WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Binary Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Create Zero Length Binary Value

 Keywords: Registry RegSetBin Make Set Create Zero Length Binary Value NULL EMPTY

Question:

Can winbatch create a zero-length binary registry value? When I use the RegSetBin function with an empty string it goes...but the value created doesn't appear to be the right type. Looks like I could use WMI: http://technet.microsoft.com/en-us/library/ee692832.aspx

Answer:

Try using ObjectType to create a true null variable.
; Create a zero length binary variable
null = ObjectType( "NULL", 0 )
RegSetBin(@REGCURRENT, "A Test Key\[My Binary Value]", null)

Article ID:   W17681
Filename:   Create Zero Length Binary Value.txt
File Created: 2011:05:06:09:04:20
Last Updated: 2011:05:06:09:04:20