Board index » delphi » NET DIR and "same path"

NET DIR and "same path"

Is there any way of pointing to the same NET DIR path,
but by using different drive letters ?

Our application sets the NET DIR file to the same location as
the executable. When the user clicks on the shortcut, and the
PC has mapped the same drive more than once, we never know
which drive letter is used.

We have tried UNC path's, but on a peer-to-peer network, the local
machine returns drive letters instead of UNC name.

Best regards

Nils Ringheim
Norbits AS

 

Re:NET DIR and "same path"


Quote
"Nils Ringheim" <n...@nsd.no> wrote:
>Is there any way of pointing to the same NET DIR path,
>but by using different drive letters ?

>Our application sets the NET DIR file to the same location as
>the executable. When the user clicks on the shortcut, and the
>PC has mapped the same drive more than once, we never know
>which drive letter is used.

>We have tried UNC path's, but on a peer-to-peer network, the local
>machine returns drive letters instead of UNC name.

The drive letter is not significant for the NET DIR.  The path, less the
drive letter must be identical though.

For UNCs you could store NET DIR as a string in the registry or ini
file.  Pity though since it's not automatic.

Regards,
Chris Roberts

Re:NET DIR and "same path"


Quote
"Nils Ringheim" <n...@nsd.no> wrote:
>Is there any way of pointing to the same NET DIR path,
>but by using different drive letters ?

The NET DIR drive letter is not significant.  It can be different.  The
BDE uses the NET DIR path, minus the drive letter, to check for same
location.  If you don't want to share the root directory of the local
machine, you can use the SUBST command on the local machine to simulate
a mapped drive, and make the paths identical.

Quote
>Our application sets the NET DIR file to the same location as
>the executable. When the user clicks on the shortcut, and the
>PC has mapped the same drive more than once, we never know
>which drive letter is used.

>We have tried UNC path's, but on a peer-to-peer network, the local
>machine returns drive letters instead of UNC name.

UNCs can be a problem.  You can manually type the UNC into the
short-cut.  However if you edit the short-cut, it will recognise the UNC
as it's own and substitute drive letters instead :-(

One option might be to save the required UNC in the registry or ini
file.  This will remove the automatic location of course.

Regards,
Chris Roberts

Other Threads