How to install Node.js in custom folder silently on Windows?

16.5k views Asked by At

I create a script to auto install all my dev stack on Windows.

I have a problem with Node.js

What's the command line to install node-v0.10.23-x64.msi in C:\Tools silently?

Thanks.

4

There are 4 answers

2
damphat On
msiexec.exe /i node-v0.10.23-x64.msi /qn
  • /i means normal install
  • /qn means no UI

I do not known how to set the destination, you can read documentation here, and check if msi supports it:

http://www.advancedinstaller.com/user-guide/msiexec.html

0
foozoor On

I found it.

This is the correct way to install Node.js on Windows silently in a custom directory.

msiexec.exe /i node-v0.10.23-x64.msi INSTALLDIR="C:\Tools\NodeJS" /quiet
0
Mike On

To expand a little on foozar's answer, which works.

msiexec.exe /i node-v0.10.23-x64.msi INSTALLDIR="C:\Tools\NodeJS" /quiet

Note that /quiet may be better replaced with /passive:

  • Passive shows the status bar, and more importantly, prompts the user for the admin password if needed.
  • Quiet mode will just fail if the installer doesn't have privileges.
1
user1026570 On

This will do the exact installation as doing it manual from the UI

msiexec /i node-v6.11.2-x64.msi TARGETDIR="C:\Program Files\nodejs\" ADDLOCAL="NodePerfCtrSupport,NodeEtwSupport,DocumentationShortcuts,EnvironmentPathNode,EnvironmentPathNpmModules,npm,NodeRuntime,EnvironmentPath" /qn