🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Retrieving the Start from directory

#6640
From: Remy Lebeau (TeamB)
Date: Wed, 20 Apr 2005 22:42
17 lines
1688 bytes
"Marc" <bukwheat_NS@axess.com> wrote in message
news:4266c896$1@newsgroups.borland.com...

> If I have a batch file on my desktop I want my application to
> return the location of my desktop. If I am located on a
> network path (\\Some Computer\SomeDirectory\Somefile.bat) I
> want to retrieve the \\Some Computer\SomeDirectory.
> GetModuleFileName returns the location of the EXE (C:\Program
> files...).  In both case the batch file run c:\Program files ...).

Rather than using a BAT file, why not just create a shortcut to the EXE
instead?  You can specify the "Start In" field in the shortcut's properties,
and the EXE can then use GetCurrentDirectory() when it first starts up.


Gambit
Technical Details
Message-ID: <4266da52$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4266bf60@newsgroups.borland.com> <4266c43b@newsgroups.borland.com> <4266c896$1@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: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4266bf60@newsgroups.borland.com> <4266c43b@newsgroups.borland.com> <4266c896$1@newsgroups.borland.com>
Subject: Re: Retrieving the Start from directory
Date: Wed, 20 Apr 2005 15:42:22 -0700
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <4266da52$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1114036818 68.69.17.41 (20 Apr 2005 15:40:18 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail