From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,814d0ec938d6e4da X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-24 08:29:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.socal.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3CC6CF6F.6DAB1D05@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to find directory where the program is? References: <3CC6191D.2DB44898@easystreet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 24 Apr 2002 15:28:34 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1019662114 66.75.151.160 (Wed, 24 Apr 2002 08:28:34 PDT) NNTP-Posting-Date: Wed, 24 Apr 2002 08:28:34 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:23059 Date: 2002-04-24T15:28:34+00:00 List-Id: Preben Randhol wrote: > By the way on windows if you want to write a config file for the current > user, how do one find the "Home directory"? It's in the environment variables, on versions of Windows where people get different profiles for different logins. Remember that there's more than one version of Windows. Alternately, use the registry. There's specifically a bit called "current user". Alternately, look at the logged in user and use that as a key to find either a file in a specific directory or a record in a specific file. This has the disadvantage that it doesn't support "roaming". -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. The 90/10 rule of toothpaste: the last 10% of the tube lasts as long as the first 90%.