Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Detecting PATH !

Posted on 1997-05-08
1
Medium Priority
?
180 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 320 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

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

721 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