Solved

Get the full path of an Application when it is started through a LAN

Posted on 2006-06-25
1
1,632 Views
Last Modified: 2012-05-05
[code]
var
  PathExe: string;
begin
  PathExe := ExtractFilePath(Application.ExeName);
[/code]
//.....................................................................

I have no problem when the Application is ran on a Local Computer to get its path ....
But I need to get the full pat when I start the Application through a LAN.
Thanks !
Emil.
0
Comment
Question by:esoftbg
1 Comment
 
LVL 9

Accepted Solution

by:
sun4sunday earned 250 total points
ID: 16979916
ExpandUNCFileName function

Returns the full path of a file name with the network drive portion in UNC format.

Unit

Sysutils

Category

file name utilities

function ExpandUNCFileName(const FileName: string): string;

Description

ExpandUNCFileName returns a string containing a fully qualified path name for the file passed in as FileName. A fully qualified path name includes the drive portion of the filename in the UNC format '\\<servername>\<sharename>' if the drive letter is mapped to a network resource instead of a local drive with any directory and subdirectories in addition to the file name and extension.

Use this function to store filenames that are independent of a particular user's drive letter mappings.

copied from From delphi Help

sun4sunday
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

18 Experts available now in Live!

Get 1:1 Help Now