Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

regedit

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regedit - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

2

package.json
{
"name": "regedit",
"version": "4.0.0",
"version": "5.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 @@ "author": "Yaniv Kessler",

@@ -60,3 +60,3 @@ # regedit

```javascript
regedit.list(['HKCU\\SOFTWARE', 'HKLM\\SOFTWARE'], function(err, result) {
regedit.list(['HKCU\\SOFTWARE', 'HKLM\\SOFTWARE', 'HKCU\\IM_FAKE_THEREFOR_I_DONT_EXIST'], function(err, result) {
...

@@ -70,2 +70,3 @@ })

'HKCU\\SOFTWARE': {
exists: true,
keys: [ 'Google', 'Microsoft', ... more direct sub keys ]

@@ -81,2 +82,3 @@ values: {

'HKLM\\SOFTWARE': {
exists: true,
keys: [ 'Google', 'Microsoft', ... more direct sub keys ]

@@ -90,2 +92,7 @@ values: {

}
},
'HKCU\\IM_FAKE_THEREFOR_I_DONT_EXIST': {
exists: false,
keys: [],
values: {}
}

@@ -239,2 +246,18 @@ }

## Promises
To use promises access the function you want through `regedit.promisified`, all function signatures are the same `([String|Array], [Arch (optional)])`
Default arch is agnostic.
### Example: regedit.promisified.list([String|Array], [Arch (optional)])
```javascript
try {
const registryList = await regedit.promisified.list(['HKCU\\SOFTWARE', 'HKLM\\SOFTWARE', 'HKCU\\IM_FAKE_THEREFOR_I_DONT_EXIST'])
} catch (e) {
console.log('Error while listing keys:', e.message)
}
```
Result and errors should be the same as not promisified.
## Develop

@@ -241,0 +264,0 @@

@@ -28,6 +28,9 @@ /* eslint-disable no-unused-expressions */

key.should.have.property('exists')
key.exists.should.eql(true)
key.should.have.property('keys')
key.should.have.property('values')
key.keys.map(toLowerCase).should.containEql('policies')
key.should.have.property('values')
key.values.should.have.property('ProgramFilesDir')

@@ -53,6 +56,9 @@ key.values.ProgramFilesDir.should.have.property('value')

key.should.have.property('exists')
key.exists.should.eql(true)
key.should.have.property('keys')
key.should.have.property('values')
key.keys.map(toLowerCase).should.containEql('policies')
key.should.have.property('values')
key.values.should.have.property('ProgramFilesDir')

@@ -77,6 +83,9 @@ key.values.ProgramFilesDir.should.have.property('value')

key.should.have.property('exists')
key.exists.should.eql(true)
key.should.have.property('keys')
key.should.have.property('values')
key.keys.map(toLowerCase).should.containEql('policies')
key.should.have.property('values')
key.values.should.have.property('ProgramFilesDir')

@@ -100,6 +109,9 @@ key.values.ProgramFilesDir.should.have.property('value', 'C:\\Program Files')

key.should.have.property('exists')
key.exists.should.eql(true)
key.should.have.property('keys')
key.should.have.property('values')
key.keys.map(toLowerCase).should.containEql('policies')
key.should.have.property('values')
key.values.should.have.property('ProgramFilesDir')

@@ -120,2 +132,6 @@ key.values.ProgramFilesDir.should.have.property('value', 'C:\\Program Files')

result.should.have.property('hklm')
result.hklm.should.have.property('exists')
result.hklm.exists.should.eql(true)
result.hklm.should.have.property('keys')

@@ -125,2 +141,6 @@ result.hklm.keys.map(toLowerCase).should.containEql('software')

result.should.have.property('hkcu')
result.hkcu.should.have.property('exists')
result.hkcu.exists.should.eql(true)
result.hkcu.should.have.property('keys')

@@ -141,2 +161,5 @@ result.hkcu.keys.map(toLowerCase).should.containEql('software')

result[key].should.have.property('exists')
result[key].exists.should.eql(true)
result[key].should.have.property('keys')

@@ -159,2 +182,5 @@ result[key].keys.map(toLowerCase).should.containEql('preload')

result[key].should.have.property('exists')
result[key].exists.should.eql(true)
result[key].should.have.property('keys')

@@ -180,2 +206,4 @@ result[key].keys.should.containEql('测试')

}
results['HKCR\\Directory\\shell\\cmd\\command'].should.have.property('exists')
results['HKCR\\Directory\\shell\\cmd\\command'].exists.should.eql(true)
results['HKCR\\Directory\\shell\\cmd\\command'].should.have.property('values')

@@ -792,3 +820,3 @@ results['HKCR\\Directory\\shell\\cmd\\command'].values.should.have.property('')

result[key + now].should.not.have.property('values')
result[key + now].values.should.not.have.property('DeleteMe')

@@ -795,0 +823,0 @@ done()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc