Full path name of shared folder

delphi package - easy access to security apis

Full path name of shared folder

Postby venkat_kgs » Wed Nov 25, 2009 8:09 am

Hi,

Few folders are shared in my pc. I wanted to get the full name (like UNC path) of the shared folders.

I tried to use IShares & IShare. Though i could get only the path and net name, i couldn't get the full name.

For eg.

Computer name = VS1
Shared folder = 'E:\VSInst'
Share Name = VSInst

Shr1 := Shares([stdisk],'*','');
Shr1[0].NetName //giving only VSInst
Shr1[0].path //giving E:\VSinst

I wanted something like \\VS1\VSInst directly from IShare object.

i.e in format
\\<<ServerName>>\<ShareName>>

Is it possble ? or shld i manually concatenate Computername and sharename ?

Tks in Adv
venkat_kgs
 
Posts: 2
Joined: Wed Nov 25, 2009 7:59 am
Location: India

Postby madshi » Wed Dec 02, 2009 9:29 am

Sorry for the late reply.

So you want the UNC path from a share on your own PC? In this case simply use GetComputerName and append the share name.
madshi
Site Admin
 
Posts: 9757
Joined: Sun Mar 21, 2004 5:25 pm


Return to madSecurity

Who is online

Users browsing this forum: No registered users and 1 guest