Install database MongoDB startup times "System error 2 occurred."
The problem is that if you've already installed it once, and two times the installation directory is different, you'll definitely encounter it, because the path you installed earlier has been generated in the registry and has not been purged with your uninstallation.
If you do it again, it's not going to work, and it's definitely the problem that the service doesn't start up. Don't believe you can run command services.msc, or directly on my computer or computer right-click into the service, you can see the path of the executable file in the General column is definitely not the path you installed this time, is the first time you install the file path.
You can try the SC command, but my test is not very successful, so simply modify the registry directly.
To enter the registry through Regedit, we first find the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, and then find the name of the program we want to install, such as my is MongoDB, There is a imagepath on the right, click to open the change. Modify to the current installation path
Install MongoDB startup times error ' occurred system errors 2 ' workaround