If using the Windows MSI installer (recommended), the MongoDB program files will be stored here:
C:\Program Files\MongoDB\Server\<version>
You have the option, during the installation process, of specifying the location where the database and log files are stored. Once finished, here is a look at the new directory structure:
The configuration file, which contains the locations of the database and log files, defaults to:
C:\Program Files\MongoDB\Server\4.0\bin\mongod.cfg
This file is automatically ...