This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cmd line does not search in user path

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.5x(a) final bug reports (English) Printable version
View previous topic :: View next topic  
Author Message
NotDifficult
Junior Member
Junior Member


Joined: 24 Oct 2010
Posts: 10

PostPosted: Thu Mar 28, 2013 6:11 am    Post subject: Cmd line does not search in user path Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8010
Location: Russian Federation

PostPosted: Thu Mar 28, 2013 6:16 am    Post subject: Reply with quote

Please describe exact steps you're doing to add folder to user path.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
NotDifficult
Junior Member
Junior Member


Joined: 24 Oct 2010
Posts: 10

PostPosted: Thu Mar 28, 2013 6:23 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message Send e-mail
umbra
Power Member
Power Member


Joined: 14 Jan 2012
Posts: 781

PostPosted: Thu Mar 28, 2013 6:45 am    Post subject: Reply with quote

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 7 Pro x64, Windows 8.1 Pro x64, Windows 10 Pro x64
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8010
Location: Russian Federation

PostPosted: Thu Mar 28, 2013 6:57 am    Post subject: Reply with quote

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.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
NotDifficult
Junior Member
Junior Member


Joined: 24 Oct 2010
Posts: 10

PostPosted: Thu Mar 28, 2013 7:08 am    Post subject: Reply with quote

@umbra
Yes! That was it:

My user path contained "%MAVEN_HOME%\bin".
Every path before is recognized correctly, all other path's do not work.

So, the workaround is to remove that entry, but it might be worth fixing it for future releases...
Back to top
View user's profile Send private message Send e-mail
umbra
Power Member
Power Member


Joined: 14 Jan 2012
Posts: 781

PostPosted: Thu Mar 28, 2013 7:24 am    Post subject: Reply with quote

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?
_________________
Windows 7 Pro x64, Windows 8.1 Pro x64, Windows 10 Pro x64
Back to top
View user's profile Send private message Send e-mail
NotDifficult
Junior Member
Junior Member


Joined: 24 Oct 2010
Posts: 10

PostPosted: Thu Mar 28, 2013 8:01 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8010
Location: Russian Federation

PostPosted: Thu Mar 28, 2013 10:20 am    Post subject: Reply with quote

Strange, multiple slashes shouldn't be a problem. Anyway, it isn't hard to fix envvars to make it working everywhere.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
umbra
Power Member
Power Member


Joined: 14 Jan 2012
Posts: 781

PostPosted: Thu Mar 28, 2013 4:34 pm    Post subject: Reply with quote

MVV wrote:
Strange, multiple slashes shouldn't be a problem.
Well, multiple backslashes are unofficially tolerated, but not valid. Sometimes they work, sometimes not.
_________________
Windows 7 Pro x64, Windows 8.1 Pro x64, Windows 10 Pro x64
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.5x(a) final bug reports (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group