Slightly Different Windows 10 v1903 experience for invoking mongo shell

Question: first, just as an information point, I was not able to do anything with windows command prompt or the power shell, in my version of windows. Both said ‘not a command’ no matter how I said it. So, I had to use more direct means, that seem simpler to me:

To invoke the mongo shell, I found two ways: I first went directly to the …\mongoDB …4.2\bin and opened the mongo executable. Then pinned it to my taskbar. It opens and quits just fine but there is no option for --nodb that way.

So, back at the command line, I second did a change directory
cd C:\Program Files\MongoDB\Server \4.2\bin
and THEN invoke mongo --nodb from this directory, it works as the course said it should.
Here is question: will I be able to use the pinned mongo shell on my taskbar, or will I need to use the change directory method to invoke mongo from the command line to make it work correctly for the course? Did I miss something in the lesson where it said I needed to do a cd first?

Isn’t there something related to Environment Variables or PATH variable in any of the lectures? If you add that path to the PATH environment variable, you will be able to call mongo without specifying the full path.

I ask because I didn’t take this course.

Yes, it is explained how to add a mongo bin path, which I did. But, it did not take until I restarted the computer. The course said that sometimes, you need to do that. When I tried, it then worked. So, I have answered my own question.

These days you don’t need to restart the computer after an environment variable change. You just need to open a new terminal.

Hi @William_Frank_90755,

I’m glad your issue got resolved.

For any other learners who might be facing similar issue. :arrow_down:

Once you have set up the Environment Variables, you can launch the mongo shell from anywhere. The new changes should be visible as soon as you relaunch the terminal or open a new terminal.

Thanks,
Shubham Ranjan
Curriculum Support Engineer