1
votes

Even after running "npm install -g msbot", I still see msbot : The term 'msbot' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again when tring to clear existing secrets and decrypt use this:

msbot secret -b my.bot --secret OLDSECRET --clear

1
had to add path in front of msbot commandBilly
I've edited my answer to show the steps for updating environment variables.mdrichardson

1 Answers

1
votes

This could be caused by a few things. Here's a few troubleshooting steps you can try:

  1. If your console is running inside of Visual Studio or VS Code, try running it from a normal console.
  2. If you just installed msbot, you may need to close and re-open your console.
  3. Ensure that your npm folder has been added to your Environment Variables.See "Adding Environment Variables" below.
  4. If you already have the PATH variable added from step 3, you may need to move that entry to ensure it is above/before your Node install path (%ProgramFiles%\nodejs\)

Adding Environment Variable

  1. Start Menu > Type "environment variables" and hit Enter

enter image description here

  1. Click Environment Variables

enter image description here

  1. Double-click Path

enter image description here

  1. Ensure C:\Users\<YourUserName>\AppData\Roaming\npm (or your npm install path) has been added to your PATH variable. You may need to restart your computer for this to take effect.

enter image description here