Solved

Detecting PATH !

Posted on 1997-05-08
1
173 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
1 Comment
 
LVL 3

Accepted Solution

by:
sperling earned 80 total points
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now