🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17576

Re: How to get application's directory?

#17576
From: Colin Maharaj
Date: Sun, 23 Mar 2003 13:06
19 lines
1715 bytes
Also, If a program is set to launch automatically in the Registry, via
the key ....

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

It is my experience that it does not start in the path the Application
is located...

Thus  ExtractFilePath(Application->ExeName);
is your best bet!



"Remy Lebeau (TeamB)" wrote:
> 
> That is another very good point I forgot to mention.  The same thing also
> applies to applications that are started from simple shortcuts which have
> their "Start In" field specified.
>
Technical Details
Message-ID: <3E7DB15B.E950C26A@cablenett.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e7a7800$1@newsgroups.borland.com> <3e7a8e39@newsgroups.borland.com> <3e7ae7af$1@newsgroups.borland.com> <3e7c7c8c@newsgroups.borland.com> <3e7cc472$1@newsgroups.borland.com> <3e7cd82a@newsgroups.borland.com> <3e7cfd40$1@newsgroups.borland.com> <3e7d4518$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,440cb76ba9be739c,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-23 21:40:51 PST
Message-ID: <3E7DB15B.E950C26A@cablenett.net>
Date: Sun, 23 Mar 2003 09:06:35 -0400
From: Colin Maharaj <cbm@cablenett.net>
X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to get application's directory?
References: <3e7a7800$1@newsgroups.borland.com> <3e7a8e39@newsgroups.borland.com> <3e7ae7af$1@newsgroups.borland.com> <3e7c7c8c@newsgroups.borland.com> <3e7cc472$1@newsgroups.borland.com> <3e7cd82a@newsgroups.borland.com> <3e7cfd40$1@newsgroups.borland.com> <3e7d4518$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 196.32.37.71
X-Trace: newsgroups.borland.com 1048424448 196.32.37.71 (23 Mar 2003 05:00:48 -0800)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail