Code Monkey home page Code Monkey logo

node-regedit's People

Contributors

afroewis avatar danperks avatar felixhao28 avatar kessler avatar m1cr0m1nd avatar muminasaad avatar nhz-io avatar quanglam2807 avatar tengattack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-regedit's Issues

Cannot open regedit folder name with special character

I try

regedit.list([
"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\nbi-nb-base-8.0.2.0.201411181905"]).on('data', function (entry) {
console.log(entry);   

})

It's not work. It cannot open that path,

I think because folder name "nbi-nb-base-8.0.2.0.201411181905" has special character.

I try to add bracket , quote,

example : {folder_name} or "folder_name" or "{folder_name}".

It's also not working. Can anyone give me a suggestion please?

Cannot package into electron app.

I tried using the package on an electron application and thought it works find on development, it doesn't work in the bundled version. Posting a screenshot

screen shot 2017-08-02 at 4 13 01 pm

Altering HKLM hive values is not working if not administrator

its a known thing that for modifying any key's value under HKLM you need a privileged user (Administrator), when trying to put a value which is under HKLM hive, the change will not be saved on the registry, yet the code will complete the process without any errors indicating that the operation succeeded.

Also note that the test defined in the project's source doesn't check the lack of permission for editing values under HKLM.

Critical error?

I'm hitting a ton of things like

{"HKLM\\Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{F79F4961-D0D8-2893-B81D-7A60F300ED6F}":
J:\Junctions\Users\Mike\Documents\Git\temp\pluginboutique\node_modules\regedit\vbs\regList.wsf(0, 2) SWbemObjectEx: Critical error

without a way to apparently either suppress those errors, or actually do anything about them (because the error in no way explains what went wrong, and what I need to change as a dev to not run into this)

Writing REG_DWORD values with more than 16 bits is broken

Trying to set a REG_DWORD with a value of e.g. 1000000 causes an error vbscript process reported unknown error code 1.

This is caused by a runtime error in VBScript due to an overflow when calling CInt (note that VBScript's Integer is a signed 16-bit type). I guess what you actually wanted is CLng (VBScript's Long is a signed 32-bit type).

Cannot find module 'regedit'

Hi,
I'm trying to get registry information
var regedit = require('regedit') regedit.list('HKCU\\SOFTWARE\\BI\\EcgLab', function(err, result) { console.log('result:' + JSON.stringify(result['HKCU\\SOFTWARE\\BI\\EcgLab'])) if (err != null) { console.log('exec error:' + err) } })

but , run the installation package, The pop-up error message:
error

Thanks!

Exceedingly slow execution?

I'm using regedit to look up the x86 and x64 uninstall lists (writing a software manager that needs to know if certain things are installed already) and so I use the following code:

const regedit = require('regedit')

const keys = [
  'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
  'HKLM\\Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall'
];

// the actual list of individual products
const realkeys = [];

// the list of resolved product entries
const entries = [];

// a list of just product names
const names = [];

/**
 * Expand the x86 and x64 "uninstall" keys to a full list of
 * registry keys we'll need to consult.
 */
function findRegKeys() {
  console.log("Resolving x86 and x64 keys...");
  let processed = 0;
  keys.forEach(uninstallKey => {
    regedit.list(uninstallKey, (err,list) => {
      list[uninstallKey].keys.forEach(key => {
        realkeys.push(`${uninstallKey}\\${key}`);
      });

      // are we done here?
      if (++processed === keys.length) {
        process.nextTick(processKeys);
      }
    });
  });
}

This then continues in the processKeys function:

/**
 * Process all keys found by the previous function
 */
function processKeys() {
  console.log(`Processing ${realkeys.length} registry keys...`);

  // We want this as sync as possible, because it seems
  // like the regedit package will return results *before*
  // they are actually done resolving to real data.
  //
  // That means if we don't wait for each entry to be
  // dereferenced by JSON.stringify first, we're going to
  // have an array of entries that might, if we run through
  // them fast enough (say, a subsequent .forEach) we're
  // going to hit shitloads of CRITICIAL ERROR notices
  // because there isn't actually any real data to work with...

  (function next() {
    if (realkeys.length === 0) {
      return processEntries();
    }

    let loc = realkeys.shift();

    regedit.list(loc, (err, data) => {
      if (err) return next();
      if (!data[loc]) return next();

      let entry = data[loc].values;

      if (!entry) return next();
      if (!entry.DisplayName) return next();

      // Force-resolve this object before moving on,
      // so that we have REAL data for each entry.
      let json = JSON.stringify(entry)
      entries.push(json);

      process.nextTick(next);
    });
  }(realkeys.slice()));
}

Which yields the actual data I care about, and hands that off for a final process pass before returning:

/**
 * Process all entries found. We turned them into strings
 * in the previous function, and we want them to be
 * normal objects, instead. So: map that.
 */
function processEntries() {
  console.log(`Processing ${entries.length} registry entries...`);
  let parsedEntries = [];
  entries.forEach(v => parsedEntries.push(JSON.parse(v)));

  // Then, we do a test. There has to be a vc++ redistributable
  // somewhere, because this is a Windows machine, and almost
  // everything comes with an install of one of those things:
  parsedEntries.forEach(entry => {
    let name = entry.DisplayName.value;
    if (name.toLowerCase().indexOf('redistributable')>-1) {
      console.log(entry);
    }
  });
}

// alright let's get this party started
findRegKeys();

On my system, this finds 690 entries, and then the processKeys function takes, literally, a minute. It needs 60 seconds to properly consult and resolve all the data, which seems inordinately long, and this seems caused by the fact that regedit.list doesn't return "real data", it seems to return early with some placeholder object that has getters for what will be real properties, but accessing them too soon will cause a "CRITICAL ERROR" notice. The only way around this I've found so far is to force full access to the object property-by-property (by using JSON.stringify) and not calling regedit.list for a next key until we're done with the current one.

So is there a way to speed this up? Or, is there a faster way to get an entire subtree associated with a key, rather than "just that key"? (and then I'll happily write my own key to run through that tree in JS. It's going to be way faster than waiting that full minute just to get the list of installed applications in the system. I initially tried to use wmic but that can't actually report on anything that wasn't installed from an .msi package, registry is the only way to get this data)

TypeError inside Regedit!

Hi,

I am getting TypeError: Cannot read property 'toUpperCase' of undefined when all I am passing to putValue is the same object I retrieved from list.
The path is at renderValueByType (C:\...\node_modules\regedit\index.js:283:13)
Is this related to #15?

Thank You!

unsupported hive error on putValue()

So I have the following in an attempt to allow Windows 8 to auto start a nodewebkit app that has to run in sysadmin mode (not without asking the user first and warning them of the risks of course...)

 var keyPath = 'HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System';

    regedit.list(keyPath, function(err, result) {
        console.log('Registry results', result);
        console.log('Registry errors', err);

        if(!err) {

            var keys = result[keyPath];

            if(typeof keys.values.EnableLUA !== "undefined") {

                console.log('Found LUA!', keys.values.EnableLUA.value);

                regedit.putValue({
                    keyPath: {
                        'EnableLUA': {
                            value: 1,
                            type: 'REG_DWORD'
                        }
                    }
                }, function(error) {
                    console.log('Updating registry', error);
                });

            } else {
                console.log('Failed to find policy system');
            }
        } else {
            console.log('Failed to find any registry values');
        }
    });

And the putValue() errors out with code: 25122 message: "unsupported hive"

I know the path is correct because it correctly reads the value of it before it tries to modify it.

command failed when app packaged with asar true in electron

Command failed: cscript.exe //Nologo C:\Program Files\anna\resources\app.asar\main\lib
etwork\win32\node\vbs\regList.wsf A HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections

Error: Command failed:
cscript.exe //Nologo C:\Program Files\anna\resources\app.asar\main\lib\network\win32\node\vbs\regList.wsf A HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections at ChildProcess.exithandler (child_process.js:217:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) killed: false, code: 1, signal: null, cmd: 'cscript.exe //Nologo C:\Program Files\anna\resources\app.asar\main\lib\network\win32\node\vbs\regList.wsf A HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections

REG_EXPAND_SZ not working properly for %USERPROFILE%

Hi.

Apologies in advance if the problem here is me being a dumbass but, using the .list function to get values of type REG_EXPAND_SZ seems to expand the strings as if they were being expanded for the SYSTEM user.

I'm using your fine module to query values from HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders". In regedit these values all contain the place holder "%USERPROFILE%" which should be expanded to "C:\Users\MyUserName" but are instead being expanded to "C:\Windows\system32\config\systemprofile". I edited one of the values to give it a value with nothing to expand and it returned the expected value so I'm not accidentally querying the wrong user's HKCU. Running "SET" from the same command prompt that I am launching the node script from shows that the USERPROFILE environment variable is set correctly.

Here is my test script:

var windows_registry = require("regedit");

windows_registry.list('HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders').on('data', function(entry) {
    for (value in entry.data.values) {
        console.log(value + ": '" + entry.data.values[value].value + "'")
    }
}).on('finish', function() {
    console.log("finished getting reg entries");
});

and the result:

Desktop: 'C:\Windows\system32\config\systemprofile\Desktop'
Local AppData: 'C:\Windows\system32\config\systemprofile\AppData\Local'
Startup: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup'
Cookies: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCookies'
SendTo: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\SendTo'
Personal: 'C:\Documents'
Recent: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Recent'
Favorites: 'C:\Windows\system32\config\systemprofile\Favorites'
My Pictures: 'C:\Windows\system32\config\systemprofile\Pictures'
Start Menu: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu'
NetHood: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Network Shortcuts'
My Music: 'C:\Windows\system32\config\systemprofile\Music'
My Video: 'C:\Windows\system32\config\systemprofile\Videos'
Cache: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache'
Programs: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs'
History: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Windows\History'
{374DE290-123F-4565-9164-39C4925E467B}: 'C:\Windows\system32\config\systemprofile\Downloads'
Templates: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Templates'
AppData: 'C:\Windows\system32\config\systemprofile\AppData\Roaming'
PrintHood: 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Printer Shortcuts'
finished getting reg entries

Let me know if there is any more information I can provide that would be helpful.

Cheers.
Shaun.

REG_EXPAND_SZ values are expanded in SYSTEM user's context

I found an issue which is unfortunately not easy to fix (research told me that with WMI it is actually impossible to fix). I still want to point it out. It is actually a duplicate of #6 but that issue was closed due to inactivity without further analysis.

When reading a REG_EXPAND_SZ value, I would expect it to be expanded with the current process' environment variables. For example, when reading the value Desktop from HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, whose raw value is %USERPROFILE%\Desktop, I would expect to get C:\Users\david\Desktop in my case.

Unfortunately, the string is expanded by the WMI service in its own context, using the environment variables of the service's process which runs under the SYSTEM account. This leads to unexpected behavior because in my example above I get C:\WINDOWS\system32\config\systemprofile\Desktop returned (which doesn't even exist because the system account doesn't need a desktop).

As a very dirty workaround, I currently check whether a value I read is of type REG_EXPAND_SZ and if it is, I do a .replace(process.env.SYSTEMROOT + '\\system32\\config\\systemprofile', process.env.USERPROFILE) on it and cross my fingers - this works because most of the expandable registry strings I'll encounter will have something to do with a user profile path, and luckily variables like LOCALAPPDATA exist for the system account too, just as C:\WINDOWS\system32\config\systemprofile\AppData\Local et al. so replacing the profile path part works.

This issue seems to be impossible to fix - the straight-forward strategy of reading the raw value and manually replacing the environment variables is not doable because WMI expands the string even when GetStringValue (and not GetExpandedStringValue) is used, for some reason, which makes it impossible to obtain the raw value before it is expanded.

The only possible way I could think of is to use WScript.Shell's RegRead method (which has different semantics unfortunately, and where 32-bit/64-bit translation issues must be taken care of manually) for REG_EXPAND_SZ because this method does not expand the string, so it can be fetched in its raw format, and then environment variables could be replaced manually (or not at all, maybe with an option).

regedit.list() throws SyntaxError when data includes tab (s)

For example, "Adobe Acrobat Reader DC - Japanese" writes following entry to registry when installing:

  • ValueName = Comments
  • Type = REG_SZ
  • Data = \n\t\t\t\n

This entry has a data including new lines and tabs, and the regedit.list() throws SyntaxError when reading above entry as follow:

Uncaught SyntaxError: Unexpected token
at Object.parse (native)
at DestroyableTransform.module.exports.vbsOutputTransform [as _transform] (Z:\hakuto\hakuto-client\node_modules\regedit\lib\helper.js:51:18)
at DestroyableTransform.Transform._read (Z:\hakuto\hakuto-client\node_modules\regedit\node_modules\through2\node_modules\readable-stream\lib\_stre
_transform.js:184:10)
at DestroyableTransform.Transform._write (Z:\hakuto\hakuto-client\node_modules\regedit\node_modules\through2\node_modules\readable-stream\lib\_str
m_transform.js:172:12)
at doWrite (Z:\hakuto\hakuto-client\node_modules\regedit\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:237:10)
at writeOrBuffer (Z:\hakuto\hakuto-client\node_modules\regedit\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (Z:\hakuto\hakuto-client\node_modules\regedit\node_modules\through2\node_modules\readable-stream\lib\_strea
writable.js:194:11)
at StreamSlicer.ondata (_stream_readable.js:528:20)
at readableAddChunk (_stream_readable.js:146:16)
at StreamSlicer.Readable.push (_stream_readable.js:110:10)
at StreamSlicer.Transform.push (_stream_transform.js:128:32)
at StreamSlicer._separatorFlush (Z:\hakuto\hakuto-client\node_modules\regedit\node_modules\stream-slicer\index.js:63:7)
at StreamSlicer._transform (Z:\hakuto\hakuto-client\node_modules\regedit\node_modules\stream-slicer\index.js:33:8)
at StreamSlicer.Transform._read (_stream_transform.js:167:10)
at StreamSlicer.Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:292:12)
at writeOrBuffer (_stream_writable.js:278:5)
at StreamSlicer.Writable.write (_stream_writable.js:207:11)
at Socket.ondata (_stream_readable.js:528:20)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at Pipe.onread (net.js:523:20)

Probably, this SyntaxError occurred if data includes tab (s). To check this, I have inputed a tab into other entry by regedit.exe then regedit.list() throws same error.

Issue while using from .asar package

Hi there,
im developing a Electron app,
and facing this issue :
Condition : packaged app with asar - error thrown = Input Error: Can not find script file APPD_DIR\resources\app.asar\node_modules\regedit\vbs\regList.wsf

#APP_DIR represents current project folder

Streaming Function is redundant, when there is no registry key found.

Hi,
I'm trying to find whether the registry key exists using regedit.

 regedit.list(/*reg key here */)
    .on('data',function(data) {
      console.log("data found");
    })
    .on('error',function(error){console.log("error!")})
    .on('finish',function() {console.log("Finish");});

But, the control doesn't fall to finish , when no suck key is found. Instead, it prints 'error' twice.

"describe is not defined"

Hi to all,
I'm trying to launch regedit.test.js, but I think there's something that I'm doing in a wrong way...

P.s. Please don't be bad, I'm new to node.js :(

image

Is 64-bit nodejs required to access 64-bit software registry?

Am I correct in assuming you need a 64-bit nodejs binary to access the 64-bit registry? Because when using a 32-bit nodejs binary, I'm guessing node-regedit will find the 32-bit version of cscript in PATH or else use the hardcoded c:\windows\system32\cscript.exe, which will be redirected by Windows to the SysWOW64 folder. And the 32-bit cscript can only access the 32-bit (wow64) registry, correct?

performance when using ExecMethod vbscript api

Copied directly from #7 :

See cscript-registry-benchmark and its output.

Calling registry.GetStringValue directly (eg, agnostic mode) is roughly 2x as fast as registry.ExecMethod_("GetStringValue", ..) with a "__ProviderArchitecture" flag / context.

The relevant bit of the output is (the third column is the difference to the agnostic duration):

Agnostic:                     2.219 sec  
64-bit:                       4.797 sec   +2.578 
64-bit (predefined method):   3.906 sec   +1.688 

As the third row shows, a small speed gain can be made by reusing the method object:

' Initialize
set method = registry.Methods_("GetStringValue")

' Then later ..
Set params = method.Inparameters
params.hDefKey = ..

Instead of doing registry.Methods_("GetStringValue").Inparameters each time.

PS. You might see "20000 sec" in the output, that's a formatting mistake, should be 2 seconds.

impossible to create or read a key's default value

hello, nice code but i can't use it for default values.

every key has a default value in the windows registry
but i can't see it with the list method
nor setting it with puvalue

regedit.list('HKCR\\Directory\\shell\openShell\\command', console.log);

// or 

regedit.putValue({
    'HKCR\\Directory\\shell\openShell\\command': {
        'default': { value 'test', type: 'REG_SZ'}
    }
}, console.log)

i tried "default" / "@" / ...
it always creates me another key instead of setting the default one.

the same with .reg file would be :
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\openShell\command]
@="test"

Docs: Explain how to use in Electron

When I used this package, it worked when running my electron app during development, but not in the packaged application. By searching this repo's issues, I found #46.

As the README doesn't say anything about setExternalVBSLocation, I think it would be useful to save pain for new users that want to use this package in their Electron app. As there are currently no docs, maybe it would be enough to explain this in README.md.

Test fails because the string is not in the correct case

At least on my computer, this test failed because the key in my registry is in uppercase - SOFTWARE and not Software

I think it will be fine to make the check case insensitive, cause either way windows doesn't care the case of the registry key - it could also be SoFTwarE.

add linter

Adding Eslint

  • Add eslint
  • Fix lint issues

support for asar packaged environment in Electron

When I use node-regedit functions in Atom Electron that packaged with asar, node-regedit functions failed. Beacuse wsf files packaged in asar file don't exist in normal file system, calling wscript with wsf file fails.
If wfs files were copied in temporary folder in this case and called with that, it would be a solution.
I will appreciate if you support asar situation in Electron.
Thanks!

Using Electron - Not working when packed in ASAR

Ahoy,

I'm using this from within electron which is working while not in asar.
When i pack it in asar it returns error "Input Error: Can not find script file 'path-to-folder\resources\app.asar\node_modules\regedit\vbs\regList.wsf'".
Also when pack everything else, except this, it returns the same error.
It looks like that while it's unpacked it still looks for files in the asar archive.

Thanks

Error niceties

Hiya Kessler.

FIY, I took the error codes you had here and made wmi-errors. You might consider using it for node-regedit too, because you get a call-stack captured at the time you create the error, a simple hierarchy for instanceof checks, and some useful properties.

If you pass undefined as value, it fails and the call back never gets called

tValuesToPut[keyLocation].DefaultUserName = { value: username, type: 'REG_SZ' };

regedit.putValue(tValuesToPut, archConstant, function (err) { callback(err); });

in here the username was passed undefined, the put value function hanged and never returned to the call back.

after investigating the issue deeper, it appeared that when executing the csscript.exe to edit the registry, the process never ends and will stick on the task manager (this is the root cause of the problem, and when you kill the process the callback function get fired)

Platform: Windows 10
Environment: Electron
Node Version: 6.11.2
Electron Version: 1.6.11

refactor readme

create an arch specific section and move friendly warning + document the various arch commands and their consequences

RegList outputing key to console.

I ended up removing the "Write" lines within vbs/regList.wf and that appears to have fixed it. Is this by design?

Here is the code I'm using:

const regedit = require('regedit');
regedit.list("HKCU\\SOFTWARE",function(err,results){
	if(err){
		console.log(err);
		return;
	}
	console.log('done');
});

making createKey/delete easier ?

the syntax is a bit repetitive when you want to create a key and add something in it (especially a default value). cound you modify the createKey function to allow a value parameter ?

function regedit_createKey(key, value, callback) {
    regedit.createKey(key, function(err) {
            var obj = {};
            obj[key] = {
                '@': {
                   value: value,
                   type: 'REG_DEFAULT'
                }
            }
            regedit.putValue(obj, callback))
    });
}

Also, when you want to remove a key it fails with acces denied if there are other keys inside.
would it be possible to just remove thoses keys recursively. I don't know how to do it, but maybe with list method ?

deleteValue

I'm trying to create the function to delete a value from a key. But exist a problem :c
vbscript process reported unknown error code 1

This script inside the regUtil.vbs not working. (I created the function)

Function RemoveValue(constHive, strSubKey, strValueName)		

	RemoveValue = DeleteValue(constHive, strSubKey, strValueName)

End Function

The variables "constHive", "strSubKey", "strValueName" is working. The problem is the DeleteValue() only.

The commit:
https://github.com/JasminDreasond/node-regedit/commit/2075afed6fba48f053f291487ed81bb8e7a23c9c
https://github.com/JasminDreasond/node-regedit/commit/4e3a8e93424a63dc4d4fec7aa34c4b14e972c1a1

PutValue is note working

I'm trying to put a value into an existing key to enable automatic windows login but it is not working, and not throwing an error in the callback either.
Here is the code:
var valuesToPut =
{
'HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon': {
'AutoAdminLogon': {
value: 0,
type: 'REG_SZ'
}
}
}
regedit.putValue(valuesToPut, function (err) {
console.log(err);
});`

and i have tried to specify the OS Architecture also with no luck
======= INFO =======
OS: Windows 10
OS Arch: x64
Node Version: 6.11.2
Node Arch: ia32
platform: Electron

Tests fail as the result of case-sensitive key matching

Tests on my local vm (WIN10 x64)

The test is looking for Software key and its there, just full caps SOFTWARE
As the keys in registry are case-insensitive imho we should ignore case in tests

  1) regedit list keys and values in a sub key can be applied to several independant keys at once:
     Uncaught AssertionError: expected [
  'AppEvents',
  'AppXBackupContentType',
  'System',
  'Volatile Environment',
  'Console',
  'Control Panel',
  'Environment',
  'EUDC',
  'Keyboard Layout',
  'Network',
  'Printers',
  'SOFTWARE'
] to contain 'Software'
      at Proxy.fail (E:\node-regedit\node_modules\should\lib\assertion.js:228:17)
      at Proxy.prop.(anonymous function) (E:\node-regedit\node_modules\should\lib\assertion.js:69:14)
      at E:\node-regedit\test\regedit.test.js:110:41
      at E:\node-regedit\index.js:243:13
      at ChildProcess.exithandler (child_process.js:197:7)
      at maybeClose (internal/child_process.js:877:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

npm install on OS X ?

Hi, I'm wrinting an multi-platform app and the windows version use node-regedit. I want to have the same source for both, windows and OS X, but when I try an npm install --verbose with node-regedit dependencies, I have this log:

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS:    win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   darwin
npm ERR! notsup Actual Arch: x64
npm verb exit [ 1, true ]

Can I fix it and keep the same source code for both platform or should I create two differents projects ?
Thank's in advance !

Blocking xplat node solution due to regedit package

Hello team,

We build an xplat solution in which we are using regedit as package. At runtime we are using regedit only for windows platform but it is since during build time on linux platform, regedit pacakge is throwing error as Not compatible with your operating system or architecture: [email protected]
Because in node-regedit package.json
"os": [
"win32"
],
This is stopping us using regedit on a cross plat solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.