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 get the windows PATH env in cygwin


Andrew DeFaria wrote:
> The real question here is what does he need the Windows PATH for?

  Agreed, it depends what purposes OP wants it for and whether it absolutely
positively has to be the exact windows path(*) or not. For complete accuracy
from within a cygwin environment you'd probably have to could go the whole hog
and use regtool to read both the user and system environment variables from
wherever-it-is-they-live in the registry(**) and then REG_EXPAND_SZ expand and
combine them yourself.  (Could equally use perl, python, or other similar
scripting language that's registry-aware on windows.)


    cheers,
      DaveK

-- 
(*) - and even what your definition of the "exact" windows path is.
(**) - HKLM\System\CurrentControlSet\Control\Session Manager\Environment
and    HKCU\Environment

--
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]