diff --git a/lib/registry.js b/lib/registry.js index e348d6e..01dd95b 100644 --- a/lib/registry.js +++ b/lib/registry.js @@ -41,7 +41,7 @@ var util = require('util') , PATH_PATTERN = /^(HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG)(.*)$/ /* registry item pattern */ -, ITEM_PATTERN = /^(.*)\s(REG_SZ|REG_MULTI_SZ|REG_EXPAND_SZ|REG_DWORD|REG_QWORD|REG_BINARY|REG_NONE)\s+([^\s].*)$/ +, ITEM_PATTERN = /^(.*)\s(REG_SZ|REG_MULTI_SZ|REG_EXPAND_SZ|REG_DWORD|REG_QWORD|REG_BINARY|REG_NONE)(\s+([^\s].*))?$/ /** * Creates an Error object that contains the exit code of the REG.EXE process. @@ -484,7 +484,7 @@ Registry.prototype.values = function values (cb) { if (match) { name = match[1].trim(); type = match[2].trim(); - value = match[3]; + value = match[4]; result.push(new RegistryItem(self.host, self.hive, self.key, name, type, value, self.arch)); } } @@ -657,7 +657,7 @@ Registry.prototype.get = function get (name, cb) { if (match) { name = match[1].trim(); type = match[2].trim(); - value = match[3]; + value = match[4]; result = new RegistryItem(self.host, self.hive, self.key, name, type, value, self.arch); }