Sadaqat
Sadaqat

Reputation: 146

Mongodb Install Path at windows

I am calling MongoDB installer from Advance installer as a prereq and making a windows service of MongoDB. If a user doesn't change default installation path of MongoDB every works fine.

If a user changes the installed path of MongoDB then I am not able to get installed path of MongoDB to make MongoDB server as windows service. Let's suppose user changes the default path to D:/Mongodb.

Could you please help me, where is installed path of MongoDB in windows registry or please suggest any other method to get the installed path of MongoDB on windows?

Upvotes: 1

Views: 3370

Answers (1)

Taimoor Raza
Taimoor Raza

Reputation: 203

You can install Mongodb silently(unintended install). You can change install location and other things by package parameters.

msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl 3.6.4-signed.msi INSTALLLOCATION="C:\Program Files\MongoDB\Server\3.6.4\" ADDLOCAL="all" SHOULD_INSTALL_COMPASS="0"

In Advanced Installer, add MongoDb as prerequisite and then go to Setup Files tab. There set all 3 fields from "Install Command Lines" to:

/qn INSTALLLOCATION="C:\Program Files\MongoDB\Server\3.6.4\" ADDLOCAL="all" SHOULD_INSTALL_COMPASS="0"

Upvotes: 3

Related Questions