Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

programatic "net share"

0 views
Skip to first unread message

aar...@ibm.net

unread,
Jul 4, 1999, 3:00:00 AM7/4/99
to
I would like to find the win32 programatic mode to do as "net share"
does form the cmd line, and specifically to get the path a share is
linked to.
For example:

[c:\tmp]net share

Share name Resource Remark
-------------------------------------------------------------------------
IPC$ Remote IPC
C$ C:\ Default share
D$ D:\ Default share
ADMIN$ C:\WINNT Remote Admin
cucu d:\temp
The command completed successfully.

I would like to give the name of the share "cucu" and get back "d:\temp"

Thanks in advance,
aaron

Jerry Coffin

unread,
Jul 4, 1999, 3:00:00 AM7/4/99
to
In article <377F71EE...@ibm.net>, aar...@ibm.net says...

> I would like to find the win32 programatic mode to do as "net share"
> does form the cmd line, and specifically to get the path a share is
> linked to.

Under NT, you can use NetShareGetInfo with an information level of 2.
Under Lose95/98 the field exists in the structure, but it's listed as
"TBD" -- IOW, it's not presently implemented. Alternatively, you
could use LDAP or ADSI. It looks like ADSI should support what you
want, but I haven't looked through LDAP carefully enough to figure out
whether it does for sure or not.


0 new messages