Need Windows Command - windows

I am using this Windows command:
Administrator>netsh interface ipv4 add address “Local Area Connection” <IP Address> <Subnet Mask> <Default Gateway>
and it returns an error not recognized as an internal or external command operable or batch file what is wrong with this command?

It could be one of these problems:
a path issue that can be solved by editing the path environment variable, or
the program is not installed in your computer.
Check if the file netsh.exe exists in the c:/windows/system32 folder. If it is there, then open the terminal and execute the command:
PATH
You will see the whole path. Make sure that the system32 folder is in it. If it is not present then you can add it using the following command:
PATH %PATH%;C:\windows\system32
If you don't have the file netsh.exe, the Network Shell might not be installed. You can download and install it from here.

Related

'mongoimport' is not recognized as an internal or external command, operable program or batch file

I'm running Windows 10 and calling !mongoimport -d osm -c bham --file bham.json using Python 3.85 in Jupyter Notebook, from a conda environment.
I get 'mongoimport' is not recognized as an internal or external command, operable program or batch file. and the file is not imported.
I have added the MongoDB tools bin folder and the server bin folder to PATH:
I have also tried:
Copying mongoimport.exe to the server bin folder.
Putting .\ before mongoimport in the command.
Calling the file directly !<full file path>.
Removing the \ after bin in PATH.
This is the only MongoDB installation I have, and I can see that the database service is running, as is Compass.
It worked on this computer before I did a clean install.
Thanks!
Edit: change tags
Turns out restarting my computer did the trick. Restarting the kernel after setting the PATH variable was not it. So, it might just have been restarting the command prompt from which Jupyter Notebook was launched after setting the PATH variable that did it.

Commands in git-lab-runner on windows machine not working

I have a gitlab-runner installed on my windows 10.
When I try to use commands like pip and sh in my .gitlab-ci.yml file the runner does not recognize these commands even though they are recognized in my windows machine when run using cmd.
All the environment variables have been setup properly on my windows machine.
i.e pip works on my windows machine but not on my gitlab-runner.
Refer this link
My config.toml file has been set to "cmd".
Error seen: 'pip' is not recognized as an internal or external command,
operable program or batch file.
setting
before_script:
- SET SH_HOME=C:\cygwin64
resolved the issue referring this question

Cannot access RIDE robot framework from other users in same machine

I installed Robotframework RIDE with my user credentials and trying to access that by logging in with the another user in the same machine. when i copy paste the ride.py(available in C:/Python27/Scripts) file from my user to another user i can access RIDE by double clicking the ride.py file, but when i try to access using ride.py through command line i am not able access RIDE showing a error msg as "ride.py is not recognised as an internal or external command, operable program or batch file ". Installed python for all users and again re installed everything through pip in C:/Users, previously installed in C:/Users/MyUser. While i am trying to re install everything using pip in C:\Users it is showing as "Requirement already satisfied"
This error indicates that ride.py is not in the %PATH% sys variable:
"ride.py is not recognised as an internal or external command, operable program or batch file ".
Usually RIDE lives at C:\Python27\Lib\site-packages\robotide
You may try to run it with the full path in the command:
pythonw C:\Python27\Lib\site-packages\robotide\__init__.py
You may check if there is C:\Python27\Scripts\ride.py and the %PATH% variable for the other users (better to change it a System level).
About the error "Requirement already satisfied" from pip, that may be because:
1. RIDE is correctly installed (but you missed to run it in the first error)
2. You were calling a different pip install
finally got the solution, problem is not with the other users or installation, it is ride.py file which is missing in 'C:\Python27\Scripts' folder i replaced that file and now i am able to access ride.py from command prompt for all users in the machine.
Check the directory where you have the ride(Python file).
Upon opening the command prompt , for me the default path is C:\Users\etwxxbe.
Copy paste the ride(Python file) in the default path ,here the directory is etwxxbe.
Then use the command C:\Users\etwxxbe>ride.py to open ride.

Issues installing PhantomJS for windows: command not recognized

following the docs here: http://attester.ariatemplates.com/usage/phantom.html, I am trying to install phantomjs on my windows machine.
I tried adding multiple lines to my Path system variable, and yet, I get the same error in the command prompt when I type in phantomjs --version.
" 'phantomjs' is not recognized as an internal or external command, operable program or batch file."
I added the phantomjs.exe to C:\phantomjs\bin\, and added C:\phantomjs\bin\phantomjs to the path, and any variation that I could think of, such as:
C:\phantomjs\bin\phantomjs.exe\; C:\phantomjs\bin; C:\phantomjs\bin\phantomjs\;
How am I not installing this right?
You don't need to put all the directories to the environment PATH variable.
Add only following to your path and restart your command prompt.
C:\phantomjs\bin\
Add phantomjs.exe to C:\Windows\System32 folder.

cmd 'patch' is not recognised as an internal/external command, operable program or batch file

I'm trying to patch my wordpress installation to protect from user enumeration.
I found a patch - here
It said to use it I need to navigate to the sites root folder, add the patch file then run it using cmd , patch -p0 <wpuserEnum.patch
When I hit enter I get the 'patch' is not recognised as an internal/external command, operable program or batch file' message
Not the most helpful error reporting. I have googled the problem all day and have not found any solutions regarding 'patch' specifically
I have checked PATH and there is a C:\Windows\System32 path there
Can anybody shed any light on what is happening and why?
I am running Windows Server 2008.
patch is not part of Windows so it won't be installed unless you install it yourself. You can get it as part of the GnuWin32 project - http://gnuwin32.sourceforge.net/packages/patch.htm
You need to edit your system environment variables, then add the path to patch.exe(in GnuWin32\bin) to the PATH environment variable...after restarting the cmd, patch should be recognized...
It helped me to run the next command:
npm i patch-package
(From here: https://www.npmjs.com/package/patch-package )
I don't think GnuWin32 works for Win10 (at least they only mentioned Win7 in their website).
The safest way (works for me) is Git for Windows: https://git-scm.com/download/win
It has patch.exe in Git\usr\bin folder. Just add it to your path will work!

Resources