Solved

Detecting PATH !

Posted on 1997-05-08
1
175 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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