Programmatically make toolbars in Windows 10 and/or learning to work with binary

Hello all,

Trying to make a new toolbar on Windows 10 that will display the hostname on the taskbar. How I manually make them is:

  1. Right-click taskbar
  2. Toolbars > New Toolbar. . .
  3. Folder: "\\%COMPUTERNAME%" (without quotes)
  4. "Select Folder" button
This method makes the registry entry HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop\TaskbarWinXP with a binary value. I was able to make this on one computer, save the value to a text file, convert it to hex, find the hex values corresponding to the hostname, then use the .Replace() method to replace the old hex value with the current hostname's hex values, and finally put that back to a byte array and make the registry entry with it.

Unfortunately, that seems to put some limitations on the length of the hostname that will display on the toolbar. If it is longer than four characters, which was the length of the hostname that I copied the registry entry from, it won’t display the toolbar at all. I’m assuming that the toolbar width is being established somewhere else in that binary, but I am not good at decoding that and the several hours of Googling didn’t help much.

So, my questions are 1) Is there a better way to programmatically create toolbars in Windows 10? 2) How can I get the binary values from the registry, which PowerShell reads as bytes I think, to a human-readable format to make the changes and convert it back? 3) Happen to have any solid resources for learning to decode the binary/bytes stuff? I’ve never worked with it before — just the basics of binary when calculating network subnets.

Thanks in advance!