diff --git a/lib/registry.js b/lib/registry.js index 6319ae3..bcae480 100644 --- a/lib/registry.js +++ b/lib/registry.js @@ -140,7 +140,7 @@ function pushArch(args, arch) { * Implemented only for Windows */ function getRegExePath() { - if (process.platform === 'win32') { + if (process.platform === 'win32' && process.env.windir !== undefined) { return path.join(process.env.windir, 'system32', 'reg.exe'); } else { return "REG";