This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to handle length limit of PATH environment variable


Greetings, Peter Bauer!

> hi,

> i was bitten by the length limit of the PATH variable of 4095 characters 
> (see [1]) and could not find a way around it. This means i have a lot of 
> software packages in different directories and each of them adds itself 
> to the PATH so one can run the executables and have the shared libs 
> available. Under Windows there is the "short path workaround" but what 
> to do under Cygwin?
> Creating links with shorter names to the directories is not feasible 
> since there may be different users and different directories per user.

> Any ideas?

1. HKCR (document associations)
Many applications do not realistically need to be in %PATH%, as they are only
usually called through associations.
You can register these associations and safely clean PATH of those offenders.

2. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
Many applications are adding to %PATH% for just one binary, which could
happily be registered there and no longer pollute global environment table.

Please report such applications to their authors.
Spare hammers for better reporting efficiency are available at your nearby
carpenters' tool shop.


P.S.
As a joke of the topic, I've had GPAC register its directory in the PATH 3
times from a single installation.

P.P.S.
Partial solution could be a wrapper that reduce PATH length by dropping
nonessential/duplicate/Win-specific paths before invoking Cygwin terminal.
I have such a wrapper for my own reasons.


-- 
With best regards,
Andrey Repin
Thursday, April 5, 2018 20:31:52

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]