Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-06-25
1
Medium Priority
?
1,662 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

971 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