-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is 64-bit nodejs required to access 64-bit software registry? #7
Comments
|
Hi @vweevers You have the arch API for handling 32/64bit access. If you do: regedit.list(...) You will access the registry based on the architecture of the node process If you do: regedit.arch.list(...) You will access the registry based on the architecture of the operating system (regardless of the process architecture) If you do: regedit.arch.list32(...) You will access the registry explicitly in 32bit architecture And finally If you do: regedit.arch.list64(...) You will access the registry explicitly in 64bit architecture |
My question only pertained to agnostic mode (running |
I've determined it's B (the 32-bit cscript is spawned, because in a 32-bit parent process, But I'm sorry, I'm thinking out loud and this isn't relevant for node-regedit anymore (I've adapted some of your code for win-detect-browsers, with credits). Thanks for your response, nonetheless. |
Hey @vweevers Thanks for the creds! I'm fairly interested in this comment you made about speed here: Did you test this? how significant is the improvement? do you know why is it faster? |
I can't give you any hard numbers, but it was significant enough for me to notice. There must be some overhead in the ExecMethod calls, and because |
Excellent! looking forward, thanks! |
See cscript-registry-benchmark and its output. Calling The relevant bit of the output is (the third column is the difference to the agnostic duration):
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 PS. You might see "20000 sec" in the output, that's a formatting mistake, should be 2 seconds. |
This is awesome! Thanks a lot. I will check if there are additional ways to optimize ExecMethod() Will update here |
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 ofcscript
in PATH or else use the hardcodedc:\windows\system32\cscript.exe
, which will be redirected by Windows to the SysWOW64 folder. And the 32-bitcscript
can only access the 32-bit (wow64) registry, correct?The text was updated successfully, but these errors were encountered: