0

I'm writing a Windows script, which has to be run under Git-Bash (a Bash shell for Windows), that needs to download node.js from nodejs.org. This is an automated script so I'm using wget and using a url such as this

wget http://nodejs.org/dist/v0.10.1/node-v0.10.1-x86.msi -O node-download.msi

The above line works by the way, but note that it grabs an msi. I need node.js itself and this is an automated script with no user interaction. There are ways to install an msi without user interaction (see Automated MSI installation) but I need to specify the install directory. The question I just linked to never gets into how to specify values for the MSI installation rather than using the defaults. It would be simpler to download node.js directly; is there some reason on windows it has to be an MSI form? Does it have to alter values in the registry or something? If it does have to be an MSI, anyone know how to control the install directory, or at least find it after it's installed?

Community
  • 1
  • 1
composerMike
  • 966
  • 1
  • 13
  • 30

1 Answers1

1

I can't verify that exact MSI right now since I'm on a mac, but normally, you set the installation directory using TARGETDIR, something like;

msiexec /passive TARGETDIR="C:\MyInstallationDirectory" /i node-download.msi

(you may want to exchange /passive for /quiet if you want a silent installation)

Joachim Isaksson
  • 176,943
  • 25
  • 281
  • 294