PTC integrity CLI no commands are recognized - mks-integrity

I have PTC integrity installed on my PC, but I would like to use CLI commands.
Unforonutaly, no PTC command is recognized in my console. Probably I have to set up some system env variables?
Or do I need some extra software/server installed besides?
I tried the next commands so far:
man imabout
man "im about"
man "im"
No manual entry for
im
si
'im' is not recognized as an internal or external command, operable
program or batch file.

when im is not recognized by your system, then
1) PTC is not running
or
2) your environmental variable is missing the entry:
C:\Program Files\Integrity\Lifecyle Manager Client\bin

First, check if you are using the client network if yes then use the
respective VPN with pulse secure or any VPN set-up with the
respective client VPN.
Second, if its in local n/w or at server location use the below basic
command
mksapiviewer --iplocal --xml im connect --hostname=HOSTNAME --port=7001
--user=ALM_USER --password=PASSWORD > Filename.txt
This will give you output in the text file and which is generated in the user folder or you can give manual file location.
If XML's exit code is coming "0" then it means the command run successfully.

This issue occurs when Tool path is not added into the PATH variable, please add the upto the Client_Install_Dir/bin directory.

Related

"'C:\Program' is not recognized as an internal or external command" error when using Azure CLI

Sometimes I have a problem with running various commands (I'm using Git Bash, if that matters). For example, when I try to execute:
az container exec --resource-group My-RG --name influxdb-container --exec-command "/bin/bash"
The command above should normally "SSH" me into the Azure Container Instance. However, instead, I'm getting:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
I found a lot of posts on SO with such error, however, the issue in those posts was about invoking commands without proper quoting of "C:\Program Files". In my case, however, there is no "Program Files" anywhere, so I have a hard time figuring out what is wrong.
az command is recognized by the shell, when I invoke it alone, I'm getting proper response from Azure CLI.
I am also getting a similar error when running docker commands sometimes. Unfortunately, right now I do not know which command exactly would cause that.
This issue happens only on my Windows machine. When I run the command from Linux or macOS, it just works.
Screenshot of the error:
And the proof that az works:
There are some things different between Linux and Windows for Azure CLI. But still, there is some configuration that is the same. You can also set the environment variable PATH the same as in Linux.
In Linux, the az command is in the path /usr/bin/, and this path is also set the environment variable PATH. Then the az command can be recognized by the shell. So the same in Windows, you can also append the path of the Azure CLI in the environment variable PATH. The screenshot shows the configuration on my side:
Then the az command can also be recognized by the CMD:
But you can also use WSL in the Windows and the same experience of the Azure CLI as in Linux.
I had a very similar issue but with AWS sam.cmd command.
Ended up solving it by editing my environment variables -> editing the "Path" system variable and using the "short path" to this command (which doesn't have any spaces) instead of the "long path". (A nice utility called Path Copy Copy helped with doing this.)
Changed from: C:\Program Files\Amazon\AWSSAMCLI\bin to: C:\PROGRA~1\Amazon\AWSSAM~1\bin
Would suspect doing something similar for the az command would have solved your issue. Suspect it may be something to do with Git Bash automatically putting quotes around the whole command when the path to the executable has whitespace in it.

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

When i run my JMeter script on commandline mode, i am getting below error.
But the same script is running perfectly fine on GUI mode.
Need some help here to fix this.
Below is the error:
C:\Users\Sundarapandiyan>jmeter -n -t D:\JMETER\apache-jmeter-3.1\bin\My Projects MyFirstUIRecordBadBoy.jmx -l \JMETER\apache-jmeter-3.1\bin\My Projects CSVSample_user.csv
'jmeter' is not recognized as an internal or external command,
operable program or batch file.
As Dave L mentioned, add the Jmeter installation bin directory to the system path using My Computer > properties > Advanced System settings > Environment variables > Under system variables, select PATH > Add D:\JMETER\apache-jmeter-3.1\bin to your path at the end.
Please note, windows only considers the jmeter.bat file even when you run jmeter. It won't run the plain jmeter file available under the installation path.
To directly run a program on the command line it needs to be either included in the environment PATH; in the same folder; or specified by full path.
To use JMeter via command line you can either:
Add the folder containing JMeter to your PATH (see https://www.java.com/en/download/help/path.xml) for how to do this across Windows versions, it's quite generic despite saying JAVA)
Run it directly from the JMeter folder (in your case D:\JMETER\apache-jmeter-3.1), this is the easiest option for you.
You can do this by either Shift+Right Clicking in the folder & using 'Open command window here') or;
Changing to the directory via command line
You can change drive & directory on the command line using:
D:
cd D:\JMETER\apache-jmeter-3.1
If we have space in folder name, the path will get break and you won't be able to run the file.
To overcome this, please use double quotes in the full path.
Example:
C:\Users\Sundarapandiyan>jmeter -n -t "D:\JMETER\apache-jmeter-3.1\bin\My Projects" MyFirstUIRecordBadBoy.jmx -l "path_to_jtl_file"
And also add complete path of jmeter. example:
C:\Users\Sundarapandiyan\Jmeter_folder\bin\jmeter -n -t [rest of the command]
If you are trying to run JMeter from the command line and are getting an error message stating that “‘jmeter’ is not recognized as an internal or external command, operable program or batch file,” it means that JMeter is not in the system path and the system is unable to find it
To solve this issue, you will need to add the path to the JMeter installation to the system path. Here are the steps you can follow:
First, locate the installation directory for JMeter. By default, this is usually “C:\apache-jmeter-X.X\bin” (without the quotes), where X.X is the version number of JMeter
Next, go to Start > Control Panel > System and Security > System
Click the Advanced system settings link on the left side of the window
Click the Environment Variables button
Under the System variables section, scroll down and find the Path variable
Click the Edit button
Add the folder location to the Path env variable

Note: do not delete any existing values. In case you are using older Windows OS
Add the path to the JMeter installation to the end of the Variable value field. For example, if JMeter is installed in “C:\apache-jmeter-X.X\bin,” you would add “;C:\apache-jmeter-X.X\bin” (without the quotes) to the end of the field
Click OK to save the changes
After following these steps, the system should be able to find JMeter and you should be able to run it from the command line without any issues

heroku pull postgresql on windows

I'm trying to pull a heroku database to my local Windows computer by using
heroku pg:pull HEROKU_POSTGRESQL_DATABASE mydatabase --app myapp
However, when I run this command I get the following error:
'env' is not recognized as an internal or external command, operable
program or batch file. ! The local psql command could not be located !
For help installing psql, see PostgreSQL-local-setup
I do have psql in my path, and I can successfully call psql from my command line. I can even call heroku pg:info --app myapp successfully, and it shows the existence of my database.
Any suggestions?
I believe the answer given here is really inaccurate so I will answer:
See, when there is an error such as "'env' is not recognized as an internal or external command, operable program or batch file" it means that the system is trying to execute a command named env. This has nothing to do at all with setting up your environment variables.
Env is not a command in windows, but in unix. I understand that you have a windows machine though. What you can do is run "git bash". (You could get it by itself but it comes with Heroku's CLI).
This gives you a unix-like environment where the "env" command is supported, and then you can run the actual heroku pg:pull command :)
I hope this helps!
I realize this is from months ago, but I'll answer in hopes of helping somebody else. You need to set your path variables. My Computer > Advanced system settings; Click on "Environment variables" and then look at "System variables". Scroll down to "Path" or "PATH", edit it, and go to the very end of the text box. Add ;C:\Program Files (x86)\PostgreSQL\9.3\bin and ;C:\Program Files (x86)\PostgreSQL\9.3\lib (or whatever your equivalent paths are for bin and lib). Restart your command prompt and it should work. :)

Problems Installing PostgreSQL 9.2

I've been trying to install the 64bit version of PostgreSQL 9.2 for Windows on my machine (Windows 7 64bit) and get this error:
The environment variable COMPSPEC does not seem to point to the cmd.exe or there is a trailing semi colon present.
I've installed it as Administrator.
I disabled the antivirus (Microsoft Security Essentials) and the firewall.
Running:
"%COMSPEC%" /C "echo test ok"
returned test ok
I've checked my System Environment Variables for trailing semi colon and I couldn't find any.
I then installed the 32bit version and managed to get to the end of the install with a different error message stating: Problem running post-install step. Installation may not complete correctly Error reading the C:\Program Files (x86)\PostgreSQL\9.2\data\postgresql.conf but there is no postgresql.conf file in that directory. It did install the application and when I try to connect the server with the red X on it it says fail at the bottom and it won't connect after I type in my password.
How can I connect to this server connection?
ComSpec is a generic error message for any installation failure.
Identifying the problem
Navigate to below path
c:\Users\XXXXXX\AppData\Local\Temp
Open 'bitrock_installer_XXXX.log'
Check, if you are getting below error:
Script stderr:
'"C:\Users\XXXXX\AppData\Local\Temp\POSTGR~1\TEMP_C~1.BAT"' is not recognized as an internal or external command, operable program or batch file.
Error running
C:\Users\XXXXX\AppData\Local\Temp/postgresql_installer_47b21c4ea1/temp_check_comspec.bat :
'"C:\Users\XXXXX\AppData\Local\Temp\POSTGR~1\TEMP_C~1.BAT"' is not recognized as an internal or external command,
operable program or batch file.
This is a problem with '8.3 file names and directories' (e.g. '\Postgres Install' -> '\POSTGR~1')
Microsoft article on disabling 8.3 file names and directories: https://support.microsoft.com/en-gb/kb/121007
Solution:
Open command prompt in admin mode
Execute following command to change the format based on your drive or all drives
Sample commands:
fsutil 8dot3name set 1" - disable 8dot3 name creation on all volumes
fsutil 8dot3name set C: 1" - disable 8dot3 name creation on c:
Execute the installation as a user having admin privileges
After install, consider resetting the 8dot3name setting to default (2) to avoid unintended consequences
Hope it solves the problem!
Very easy fix:
Just open Advanced System Settings in Control Panel and create a new System Variable( in the System Variable instead of User Variable section).
In the variable name, enter ComSpec and then in the variable value , enter C:\Windows\system32\cmd.exe.
Alternative fix:
If you have already the ComSpec variable in the System Variable section, remove the ;at the end of it this should fix it.
It's not COMPSPEC it's just COMSPEC. Please show the output of:
echo %COMSPEC%
Note that COMSPEC could be set to something different in the Administrator account you're running the installer as. I'm not sure how to find that out, but it might appear in the PostgreSQL installer log, so please upload that and link to it in your post. See Reporting an installation error for info on where to get the installer log.
See the PostgreSQL for Windows FAQ entry Check the COMSPEC environment variable.
Here's a report I made suggesting that the installer should test for this explicitly and here's my blog post on the topic.
I got the same problem, and i found in the log:
Script stderr:
'C:\Users\S300' is not recognized as an internal or external command,
operable program or batch file.
Error running C:\Users\S300 (i5)\AppData\Local\Temp/postgresql_installer_56caeadbd6/temp_check_comspec.bat : 'C:\Users\S300' is not recognized as an internal or external command,
operable program or batch file.
I change in User Variables TEMP to D:\TEMP and TMP to D:\TEMP.
And Solved My Problem.
In my case , the Installer was in %USERPROFILE%\DownloadsP{ Windows download folder}, I moved the installer to desktop and ran again. weird it worked lol.
I had a similar problem. After installation, the data folder contained no postgres.conf file. It only contained a single folder named "pg_log".
I described the solution that I used here: Postgres Installation Error reading file postgresql.conf
Basically, it would be helpful to check if the user has full permissions for the postgres folder, and run "init_db" and "pg_ctl start" commands again. If the path contains a space character, try using a relative path for the pg_ctl data folder argument.
I'm running Windows Server 2003 R2, and I have been unable to resolve this problem with the installer, so I resorted to using the binary PostgreSQL package. Hopefully this will be an alternative for others who do not want to perform an OS reinstall.
First, some background (hopefully useful to the developers)
It started out with the postgres service failing to start (the server had been running reliably for over a year). I assumed it was a corrupted PostgreSQL installation, so I uninstalled and attempted to reinstall. I encountered the following error:
There has been an error.
The environment variable COMSPEC does not seem to point to the cmd.exe or there is a trailing semicolon present.
Please fix this variable and restart installation.
However, the COMSPEC variable is set properly, verified with:
echo %COMSPEC%
C:\WINDOWS\system32\cmd.exe
and:
"%COMSPEC%" /C "echo test ok"
test ok
Since this is Windows Server 2003, there is no UCA wrapper around the Administrator account, so that is not causing the problem.
Manual Installation
NET USER postgres /ADD
C:\pgsql\bin\initdb.exe -U postgres -A password -E utf8 -W -D C:\pgsql\data
runas /user:postgres "C:\pgsql\bin\pg_ctl -D C:/pgsql/data -l C:/pgsql/logfile.txt start"
just do it run as administrator and change the environment system variable
like create a new variable 'ComSpec' and value type 'C:\Windows\system32\cmd.exe'.
If the installer exe is on a network share that mapped drive might actually not be accessible to the installer as it runs as administrator. This can often happen in some virtual machine arrangements such as running windows in a parallels VM. Copy the installer to a local drive first and you won't have a problem.
What worked for me after trying to enter the commandline given her in cmd.exe
I found it was named cmd1.exe in system32.. so i copied the file and renamed it as cmd.exe and installation finished
Open Environment Variables, you can do this on Windows 7 by typing environment variables in the Search program and files bar when pressing the start button at the bottom left of the desktop. And create a new System Variable(in the 'System Variable' instead of 'User Variable' section).
In the variable name, enter ComSpec and then in the variable value , enter C:\Windows\system32\cmd.exe.
That's all. Hope it works!
Alternative fix:
If you already got the ComSpec variable in the System Variable section, remove the ; at the end of it this should fix it.
First find the path to cmd.exe(mostly it is C:\Windows\System32\cmd.exe).
Go to the enviornment variable and add this path to system variable path.And also create new variable in user variable called ComSpec and add this path as value. And you are ready to go.

'chcp' is not recognized as an internal or external command, operable program or batch file. on a Windows PC

I am receiving the error message below in the command prompt when using the git init command. I'm using a Windows PC running Windows 7.
C:\rails_projects\first_app>git init
'chcp' is not recognized as an internal or external command,
operable program or batch file.
Reinitialized existing Git repository in C:/rails_projects/first_app/.git/
'chcp' is not recognized as an internal or external command,
operable program or batch file.
I'm new to Ruby on Rails and I'm trying to create a repository for my Rails project. When I use a command such as rails new first_app or rails server I don't receive the message, only when I used the git init command does it show up. Also, as you can see the command still functions correctly (i.e. Reinitialized existing Git repository in C:/rails_projects/first_app/.git/), however, it's annoying to see the error message every time I make a command.
Does anyone have any idea how to fix this problem? I found a link that told me I need to switch the console to Windows-1252 http://illegalargumentexception.blogspot.com/2009/04/i18n-unicode-at-windows-command-prompt.html#charsets_1252 but that didn't work.
I appreciate any help, thanks!
See if your PATH environment variable is setup properly. Any system should have atleast the below on PATH
;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
Add the above if not there.
Once added, open a new cmd / bash and try:
where chcp
It should give the path.
Then try with the git init again
Edit
If you need help to find where to add it
You have broken PATH (check with SET PATH), chcp is internal Windows-command, which can be found in $Windows\system32\ dir
I copied the file from windows/system32 into the Vmware CLI/bin directory which resolved it for me.
Looks like this same issue. The link has some ideas on how to fix it. In the link, the issue was created by Git being installed standalone, and with rails.
Go to \RailsInstaller\Git\cmd then open the git (command prompt file) with a text editor or word pad (by right clicking the file and selecting edit) now there would be two lines which would look like
#chcp %cp_ansi% > nul < nul
and
#chcp %cp_oem% > nul < nul
delete both of them, and save the file . This should resolve the problem

Resources