Im getting the following error;
'mongod' is not recognized as an internal or external command,
operable program or batch file.
I've googled/read various threads and incorrect path seems to be common root cause.
However I have specified what appears to be correct path (tried both with and without quotation marks as you can see) ;
You need to add the directories to the PATH variable. Click on the Path variable, then "Edit" and add 2 entries listed below. You then need to click "OK" twice for the changes to be fully saved.
%Mongo%
%Mongo2%
This references the two environment variables which you have created.
Notice: you may need to restart cmd before changes take effect.
Related
As documentation says, I have to write Mongo in my shell to run the Mongo shell. However, It won't work!
On the other hand, If I go to its directory (program-files/mongoDB/Server/4.4/Bin) and I type .\mongo , it opens and works!
Is there a way I can just use it from any directory? I am constantly moving across files to use it and it gets very annoying. I already tried to run npm i -g mongo and did nothing.
Thanks!!
translated from Spanish:mongo: The term 'mongo' is not recognized as the name of a cmdlet, function, script file, or executable program. Check if you entered the name correctly or, if you included a path, check that the path is correct
and try again.
You need to add path for mongoDB in Environment variable. Visit below link to know more:
https://dangphongvanthanh.wordpress.com/2017/06/12/add-mongos-bin-folder-to-the-path-environment-variable/
I am trying to configure dymola.mos file, here is an example of changing directory, but when I activate Dymola, it seems the working directory doesn't change at all, even though the log shows Dymola run the script.
My question is:
How could I make the cd command work in the dymola.mos file?
I assume you have activated the option Save startup directory. You can check this with the flag Advanced.StartupDirectory, which will be either 1 or 2. You can simply turn that off or follow the steps below.
From your command log we see that:
Dymola first executes the script <install-path/insert/dymola.mos
Then it restores the settings stored in setup.dymx
Hence the settings in setup.dymx override your working directory.
Instead of using <install-path/insert/dymola.mos you should use a custom .mos script, which is passed as first argument to dymola.exe on startup. This will always be executed last.
Example for Windows
Create the file startup.mos somewhere, e.g. in C:\dymola\startup.mos
Create a shortcut to Dymola.exe, (for Dymola 2021x: C:\Program Files\Dymola 2021x\bin64\Dymola.exe)
Add the .mos script as argument in the Target field in the properties of the shortcut. The result will be:
"C:\Program Files\Dymola 2021x\bin64\Dymola.exe" "C:\dymola\startup.mos"
I'm very confused about the error message I get. If I change the path to look for make in "C:\cygwin6400\bin" ( intentional forcing an error ) I get
Cannot run program "make": The system cannot find the file specified.
Error: Program "make" not found in PATH
PATH=[C:\cygwin6400\bin;......
as I would expect, now if I fix my path to point to "C:\cygwin64\bin" I get
"C:\cygwin64\bin\make.exe" all
Cannot run program "C:\cygwin64\bin\make.exe": The system cannot find the file specified.
So what does this error mean then because its not the same error about a missing make file path.
I know its not a path issue as I can run make from a cmd prompt at any location and it runs the make in my cygwin64\bin dir. So my only guess is it cant find something other then make.exe.
edit the path enviroment variable in your Mycomputer properties and append this line with a semi colon as value for the variable 'path'
variable Name: path
variable value: C:\cygwin64\bin;
open a new cmd window and type make, so that you can run make utility.if you run this utility successfully, eclipse ide will recognize the make utility.
I have changed the shell key in windows registry to gain custom shell (Kiosk usage):
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon]
I set shell key to a batch file which runs two applications as below:
start "myFirstAppTitle" "myAppPath\myApp1.exe"
start "mySecondAppTitle" "myAppPath\myApp2.exe"
Each application runs but the second application which needs some files to be excuted throws an error which says could not find dependency files. whereas the dependency files are adjoining to the exe file and the mentioned app works fine, when starts from startup.
Meanwhile when i run the batch file manually it rusn fine.
I added the PATH command to the batch file but it did't work too.
Change the batch file to this:
set PATH=%PATH%;C:\MyAppPath
start "myFirstAppTitle" "myApp1.exe"
start "mySecondAppTitle" "myApp2.exe"
If you start executables without an absolute path, the path is relative to the current working directory. Also, when you specify an executable with a relative path, %PATH% is not searched for a matching subfolder with a matching executable.
Since the script worked when you manually started it, your working directory probably was C:\. However, when run at logon as a replacement shell, the working directory is most likely "%SystemRoot%\system32".
The problem solved strangely, i removed the title parameter of start command and it worked. In fact i used start command this fashion:
set PATH=%PATH%;C:\MyAppPath
start myapp.exe
start myapp2.exe
Using Windows Workflow in TFS2010, I set up a PS script to run at end of build process. Followed example in http://www.ewaldhofman.nl/post/2010/11/09/Part-14-Execute-a-PowerShell-script.aspx to a T and it appears correct in Process section of build definition. However, no matter what I set arg to the dir path of script, the result is always...
The term '.\DataServiceCpy.ps1' is not recognized as the name of a cmdlet, func
tion, 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.
I've tried 10 variations of the path. I enabled PS scripts to run on build server and I can run the script successfully from cmd prompt.
Anything obvious that I am overlooking?
many thanks...
In TFS 2013 (not sure for others) exists RunScript activity which is placed into "Team Foundation Build Activities" in Toolbox. I prefer that activity when I want to execute some custom script.
To use this you need to first create arguments (at least one for script path)! To create arguments follow this post.
After you created argument for script path you need to navigate yourself to "Metadata" argument on arguments tab. Add your created argument and also add following statement in "Editor" field: Microsoft.TeamFoundation.Build.Controls.ServerFileBrowserEditor, Microsoft.TeamFoundation.Build.Controls
After that go to "Properties" on RunScript activity and into FilePath insert following statement: AdvancedBuildSettings.GetValue(Of String)("PUT_HERE_YOUR_ARGUMENT_NAME", String.Empty)
Note that you need to insert in last statement exactly name of your argument which you created for script path.
After you are done:
check in your changes;
go to build definition "Process" tab and press "Refresh" button in "Build process template" section;
These steps will allows you to browse your source control and choose your script which you want without providing path.
If you don't need to insert new activity, you can just modify old arguments.
I did it the same way using the same blog and it worked for me. The only difference that I see is that my Powershell script lives in the solution/project folder and in the build definition I specify the powershell script using a relative path. Having a relative path works well with ConvertWorkspaceItem activity. You may want to check (output) the file path that you get after your ConverntWorkspaceItem activity to see if that is the right path.
I hope that helps.