Comparing version 2.2.7 to 3.0.0
28
index.js
@@ -0,1 +1,2 @@ | ||
var fs = require('fs') | ||
var util = require('util') | ||
@@ -36,2 +37,17 @@ var childProcess = require('child_process') | ||
/* | ||
* If this value is set the module will change directory of the VBS to the appropriate location instead of the local VBS folder | ||
*/ | ||
var externalVBSFolderLocation = undefined; | ||
module.exports.setExternalVBSLocation = function (newLocation) { | ||
if (fs.existsSync(newLocation)) { | ||
externalVBSFolderLocation = newLocation; | ||
return 'Folder found and set'; | ||
} | ||
else{ | ||
return 'Folder not found'; | ||
} | ||
} | ||
module.exports.list = function (keys, architecture, callback) { | ||
@@ -341,3 +357,13 @@ //console.log('list with callback will be deprecated in future versions, use list streaming interface') | ||
function baseCommand(cmd, arch) { | ||
return ['//Nologo', path.join(__dirname, 'vbs', cmd), arch] | ||
var scriptPath | ||
// test undefined, null and empty string | ||
if (externalVBSFolderLocation && typeof(externalVBSFolderLocation) === 'string') { | ||
scriptPath = externalVBSFolderLocation | ||
} else { | ||
scriptPath = path.join(__dirname, 'vbs') | ||
} | ||
return ['//Nologo', path.join(scriptPath, cmd), arch] | ||
} |
{ | ||
"name": "regedit", | ||
"version": "2.2.7", | ||
"version": "3.0.0", | ||
"description": "Read, Write, List and do all sorts of funky stuff to the windows registry using node.js and windows script host", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
180435
2525
34
5