Solved

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

Posted on 2006-06-25
1
1,640 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or 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…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 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