kessler / node-regedit

Read, Write, List and do all sorts of funky stuff to the windows registry using node.js and windows script host
MIT License
277 stars 45 forks source link

putValue with empty string for value fails silently #8

Closed CharlieHess closed 9 years ago

CharlieHess commented 9 years ago

An empty string is a valid value for lots of things, but when I attempt to set it using putValue, it fails silently.

let values = {
  'HKCR\\Foo': {
    'URL Protocol': {
      value: "",
      type: 'REG_SZ'
    }
  }
};
regedit.putValue(values, (err) => {
  // Never gets here
}
kessler commented 9 years ago

@CharlieHess 2.2.5 should fix this problem. Do let me know if it doesn't.