Cmd line does not search in user path
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 10
- Joined: 2010-10-25, 05:17 UTC
Cmd line does not search in user path
TC 7.57a
Windows 7 32bit
Steps to reproduce:
- Add folder a containing program b to user path (not system path!)
- Enter "b" in TC's cmd line
-> "File not found"
- Enter "cmd" then "b"
-> b executes
Expected behaviour:
TC should not only search on the system path but also on the user path.
Windows 7 32bit
Steps to reproduce:
- Add folder a containing program b to user path (not system path!)
- Enter "b" in TC's cmd line
-> "File not found"
- Enter "cmd" then "b"
-> b executes
Expected behaviour:
TC should not only search on the system path but also on the user path.
-
- Junior Member
- Posts: 10
- Joined: 2010-10-25, 05:17 UTC
How to set the path in Windows 7:
http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
The path variable in the upper part I called "user path", the path variable in the lower part is the "system path"
Supplement: Of course, I restarted TC afterwards!
http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
The path variable in the upper part I called "user path", the path variable in the lower part is the "system path"
Supplement: Of course, I restarted TC afterwards!
Not confirmed on (at least on Win8). The user-specific path is properly concatenated to the system-wide path variable. You should try to type a full name of the executable (extension included) - sometimes it's required to resolve its path correctly. Also, does your user-specific path contain other environment variables?
Windows 10 Pro x64, Windows 11 Pro x64
When I tried it, I added envvar PATH pointing to D:\TEMP in user section of system properties window. After applying changes I've noticed that TC got my path even w/o restarting (it has become added to PATH variable in TC; I've checked it with Process Explorer tool). So I was able to run batch file from that directory by typing only its name. Tested on Win7.
-
- Junior Member
- Posts: 10
- Joined: 2010-10-25, 05:17 UTC
This is not a TC issue. IIRC, TC does not see two path variables, only one provided by Windows.
Environment variables in user-specific path shouldn't be a problem. First, does %MAVEN_HOME% really exist? And if yes, is it just that one variable that's causing the problem?
Environment variables in user-specific path shouldn't be a problem. First, does %MAVEN_HOME% really exist? And if yes, is it just that one variable that's causing the problem?
Windows 10 Pro x64, Windows 11 Pro x64
-
- Junior Member
- Posts: 10
- Joined: 2010-10-25, 05:17 UTC
Again a very good guess!
%MAVEN_HOME% does exist. However, it ends with a backslash.
"%MAVEN_HOME%\bin" thus results in two backslashes.
Removing the backslash from the path ("%MAVEN_HOME%bin") solves this issue.
BTW, having two backslashes:
- mvn can be launch by cmd.
- mvn cannot be launch from TC's cmd line.
- mvn cannot be launch using Win+R
Having just one backslash:
- mvn can be launch by cmd.
- mvn can be launch from TC's cmd line.
- mvn can be launch using Win+R
So, it's indeed not really a TC issue. However, cmd deals with it better. Couldn't TC be enhanced the same way?
%MAVEN_HOME% does exist. However, it ends with a backslash.
"%MAVEN_HOME%\bin" thus results in two backslashes.
Removing the backslash from the path ("%MAVEN_HOME%bin") solves this issue.
BTW, having two backslashes:
- mvn can be launch by cmd.
- mvn cannot be launch from TC's cmd line.
- mvn cannot be launch using Win+R
Having just one backslash:
- mvn can be launch by cmd.
- mvn can be launch from TC's cmd line.
- mvn can be launch using Win+R
So, it's indeed not really a TC issue. However, cmd deals with it better. Couldn't TC be enhanced the same way?