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

Posted on 2006-06-25
Medium Priority
Last Modified: 2012-05-05
  PathExe: string;
  PathExe := ExtractFilePath(Application.ExeName);

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 !
Question by:esoftbg
1 Comment

Accepted Solution

sun4sunday earned 1000 total points
ID: 16979916
ExpandUNCFileName function

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




file name utilities

function ExpandUNCFileName(const FileName: string): string;


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


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…

622 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