Solved

Detecting PATH !

Posted on 1997-05-08
1
179 Views
Last Modified: 2010-04-06
How can I detect what is the path from which I'm starting a program ? Path must include a drive letter (is's supposed to be on a CD-ROM). The program must detect where is its location .

 If you can give me a complete solution which would write the found path to a ini file let me know I will incr ease the points.
0
Comment
Question by:sile
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
sperling earned 80 total points
ID: 1336009
uses
  Forms, SysUtils, INIFiles;

function StartupPath : STRING;
begin
  Result := ExtractFilePath(Application.EXEName);
end;

procedure PathToIni (ININame, Section, ValueName : STRING);
var
  INIFile : TINIFile;
begin
  INIFile := TINIFile.Create(ININame);
  INIFile.WriteString (Section, ValueName, StrartupPath);
  INIFile.Free;
end;


Regards,

Erik.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month8 days, 3 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question