public inbox for
 help / color / mirror / Atom feed
From: Andrey Repin <>
To: Peter Bauer <>,
Subject: Re: How to handle length limit of PATH environment variable
Date: Thu, 05 Apr 2018 17:50:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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.

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

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:
Unsubscribe info:

  parent reply	other threads:[~2018-04-05 17:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05  9:19 Peter Bauer
2018-04-05 10:06 ` Wolf Geldmacher
2018-04-05 16:26   ` Brian Inglis
2018-04-05 11:50 ` Steven Penny
2018-04-05 17:50 ` Andrey Repin [this message]
2018-04-05 18:48   ` Achim Gratz
2018-04-06  0:35     ` Andrey Repin
2018-04-11 13:43     ` Peter Bauer
2018-04-06  0:31 ` Hans-Bernhard Bröker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).