VBScript engine issue #133

Closed
ardoramor opened this Issue Jan 16, 2016 · 8 comments

Projects

None yet

2 participants

@ardoramor

I've just installed nvm v1.1.0 on Windows 7 64-bit machine. I also installed node 0.12.9 32 and 64-bit versions using nvm. When I try to execute nvm use 0.12.9 64 from command prompt, it gives me the following error:

Can't find script engine "VBScript" for script
"C:\Users\...\AppData\Roaming\nvm\elevate.vbs".

I am able to run wscript and cscript. My system also has VBScript.dll registered and regedit also has the proper path in the value.

I was also able to execute my test script just to make sure that my corporate is not blocking .vbs executions.

Anyone has an idea why this might be happening?

@coreybutler
Owner

elevate.vbs is a part of NVM and should exist after the installation. Can you verify the file exists?

Additionally, I'd suggest installing another version of Node that's not on the 0.12.x branch. A few users have encountered strange issues with those specific versions of node. If you can install another version (perhaps 0.10.31 or 4.2.1) and successfully use it, it will provide more insight into this issue.

@ardoramor

I've checked and elevate.vbs exists:

nvm-dir

But the error still happens when I try to execute use for version 0.11.6:

vbs-engine

I basically happens when nvm tries to setup the symlink to the chosen version.

I'll do some more debugging.

@ardoramor

So nvm executes the following command when trying to make symlink:

C:\Users\...\AppData\Roaming\nvm\elevate.cmd cmd /C mklink /D "C:\Program Files\nodejs" C:\Users\...\AppData\Roaming\nvm\v0.11.6

I am able to execute the command myself and it prompts me for permissions. I do not see the VBScript engine error.

Is it possible that GO runs in some different environment? That's the only explanation that comes to my mind.

@coreybutler
Owner

I don't think this is a Go environment issue (otherwise everyone would have this issue). It could be a problem with the default path of the VBScript engine.

To check, open regedit and check the following key: HKCR\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32. There should be a Default key in there set to C:\Windows\system32\vbscript.dll.

Bottom line: the error message you're receiving is due to a failure to recognize the VBScript engine, not due to the file structure. This usually means there is a permission problem (i.e. the path to VBScript may exist but cannot be read, thus cannot be recognized) or a configuration problem. Since you can run the script manually, I suspect a configuration issue in the registry.

@ardoramor

It's just as you mention:

regedit

@ardoramor

Ok, I think I found the issue. In Wow6432 node, the corresponding entries have McAfee path. Fixing that should fix the issue.

@ardoramor

Ok, it works now. Just for anyone else running across the similar issue, I used MCPR tool (official McAfee): http://service.mcafee.com/FAQDocument.aspx?id=TS101331

@coreybutler
Owner

I'll reference this in the README in case anyone else runs into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment