Skip to content

type error when call Key.setValue() #37

@askdaddy

Description

@askdaddy
   var ky = new Key(windef.HKEY.HKEY_CURRENT_USER, 'Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings', windef.KEY_ACCESS.KEY_WRITE);

        ky.setValue('ProxyEnable',windef.REG_VALUE_TYPE.REG_DWORD,1 );
        ky.close();

And I got a TypeError:

TypeError: Cannot read property 'deref' of undefined
    at Object.setValueForKeyObject (C:\Users\askda\git\proxy_mgr\node_modules\windows-registry\lib\registry.js:113:100)
    at Key.setValue (C:\Users\askda\git\proxy_mgr\node_modules\windows-registry\lib\key.js:44:24)
    at Object.setProxy (C:\Users\askda\git\proxy_mgr\index.js:10:12)
    at Object.<anonymous> (C:\Users\askda\git\proxy_mgr\test\test.js:14:5)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions