Article View: borland.public.cppbuilder.nativeapi
Article #6774Re: Retrieving the Start from directory
From: Marc
Date: Wed, 20 Apr 2005 22:08
Date: Wed, 20 Apr 2005 22:08
54 lines
2512 bytes
2512 bytes
Hi From memory extractfilepath return the path of the exe name, which is equivelent to the GetModuleName. I'll try it to make sure, but I pretty sure that is its behavior. Thanks Marc "Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote: >Look at ParamStr(0) or Application->ExeName. > >Example: > Path = ExtractFilePath( ParamStr(0) ); >or: > Path = ExtractFilePath( Application->ExeName ); > >-- >Best regards, >Vladimir Stefanovic >"Marc" <bukwheat_NS@axess.com> wrote in message >news:4266bf60@newsgroups.borland.com... >> >> Hi >> >> I am having an issue with retrieving the directory from where >> my application is started from, let me explain... >> >> GetModuleFileName and GetCurrentDirectory aren't cutting it for >> me. GetMod... retruns the location of my exe as expected as >> for GetCurrentDirectory it works only when I am local on my >> system. >> >> Results from GetCurrentDirectory executions: >> My actual EXE resides on C:\program files\Somedirectory\Application.exe. >> 1. From the RUN dialog box GetCurrentDirectory return the location where >> the EXE resides. >> 2. I have a batch file located on my desktop from which I >> execute the same command line as in the run command, in this >> case I get my desktop folder as expected. >> 3. Same batch file as the one on my desktop but this time I run >> it off a shared network path (\\somePC\SomeDirectory\file.bat >> in this case GetCurrectDirectory return C:\Windows. >> >> I have 2 questions, why C:\Windows and how can I have my >> application return the network path? >> >> Thanks for the help. >> Marc >> > >
Technical Details
Message-ID:
<4266c4ce$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4266bf60@newsgroups.borland.com> <4266c12e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d14a13f082d61e40 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Marc" <bukwheat_NS@axess.com> Sender: "Marc" <bukwheat_NS@axess.com> Reply-To: "Marc" <bukwheat_NS@axess.com> Subject: Re: Retrieving the Start from directory Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 138.11.254.204 X-Forwarded-For: unknown References: <4266bf60@newsgroups.borland.com> <4266c12e@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <4266c4ce$1@newsgroups.borland.com> Date: 20 Apr 2005 14:08:30 -0800 X-Trace: newsgroups.borland.com 1114031310 207.105.83.66 (20 Apr 2005 14:08:30 -0800) Lines: 55 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail