Skip to content
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

VBScript engine issue #133

Closed
ardoramor opened this issue Jan 16, 2016 · 14 comments
Closed

VBScript engine issue #133

ardoramor opened this issue Jan 16, 2016 · 14 comments

Comments

@ardoramor
Copy link

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
Copy link
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
Copy link
Author

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
Copy link
Author

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
Copy link
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
Copy link
Author

It's just as you mention:

regedit

@ardoramor
Copy link
Author

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

@ardoramor
Copy link
Author

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
Copy link
Owner

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

@davidshepherd7
Copy link

For anyone else running into this: it doesn't matter if McAfee is currently installed, if it was ever installed on your system it could have broken it.

@Calvin-he
Copy link

Calvin-he commented Apr 21, 2017

If I don't want to uninstall and re-install McAfee, how should I fix the issue?

@nomadicBlue
Copy link

I had a different issue. Somehow files with ".vbs" extensions got associated with Notepad++. To fix it I opened a cmd shell (run as Administrator) and executed the following:
assoc .vbs=VBSFile

@bmcminn
Copy link

bmcminn commented Dec 25, 2017

I've never installed McAfee on this system, my registry looks good, .vbs files are associated with Windows Based Script Host, have tried as both my normal user and as admin...

At a complete loss for what the issue is here...

@jbergens
Copy link

jbergens commented Jun 27, 2019

I think I had this problem before but checked the scripts it wanted to run and it was only for creating the symlink. I wrote a small bat-script that sets the symlink instead and that worked for me. I basically use my script instead of calling "nvm use". I still run other commands like "nvm install" etc through the normal nvm.

It basically ends up doing this:
mklink /J "%NVM_SYMLINK%" "%NVM_HOME%\v%1"

@jpheneger
Copy link

I had a different issue. Somehow files with ".vbs" extensions got associated with Notepad++. To fix it I opened a cmd shell (run as Administrator) and executed the following: assoc .vbs=VBSFile

Like @nomadicBlue I had installed Notepad++ and it associated .vbs to itself. Running the command that @nomadicBlue referenced in a command prompt (as administrator) fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants