fresc81 / node-winreg

node module that provides access to the Windows Registry through the REG commandline tool
211 stars 60 forks source link

Issue with Genymotion installation #17

Closed teobugslayer closed 8 years ago

teobugslayer commented 9 years ago

Hi all,

Genymotion is a very popular Android emulator, which is preferred by developers due to its speed and ease to use. The issue is that it contains an "reg.exe". If the user manually adds its directories to the PATH before the Windows directory, node-winreg tries to use it.

The fix would be to always use %windir%\system32\reg.exe

fresc81 commented 8 years ago

I'm not sure if this would lead into problems selecting the correct version of the reg.exe on 64 bit environments. What are the side effects here?

teobugslayer commented 8 years ago

AFAIK none. For 32-bit node.exe, WoW64 redirection kicks in and re-writes the path to the syswow64 directory, thus giving back the 32-bit reg.exe. For 64-bit node.exe, there is no file system redirection, and the 64-bit reg.exe is used.

fresc81 commented 8 years ago

okay I'll give it a try. still have to check if the node's spawn function correctly interprets the environment variable and if there are some side effects under Linux when using that syntax

teobugslayer commented 8 years ago

Sure. Let me know if you need more information or any other help.

fresc81 commented 8 years ago

would a configuration option to specify the path to the reg.exe do it for you? this way winreg might even work with wine under linux.

fresc81 commented 8 years ago

This would probhably still use the executable found through PATH by default. But you could configure it's path when creating winreg objects.