
local drive letter <> drive share name
Hi Randy,
Again, thank you for the help.
Maybe I'm missing something, but I don't see anyway to use WNetOpenEnum,
WNetEnumResource to obtain the share names of the local drives. As near as I
can tell, this only works to enum local logical drives mapped to external
shares.
--
Dale Sampson
http://www.dalesplace.net/download/
Quote:
> The 9x version is at
> http://www.mvps.org/vbnet/code/network/wnetenumresource.htm
> --
> Randy Birch
> MVP Visual Basic
> http://www.mvps.org/vbnet/
> Please respond only to the newsgroups so all can benefit.
> > Thank you Randy! - I missed this when I was nosing around your site
> > earlier.
> > This works fine for the NT OSs - now for with W9x machines .....
> > Some how it doesn't seem like this should be this hard.
> > Thanks again,
> > --
> > Dale Sampson
> > http://www.dalesplace.net/download/
> > > I can tell you that under NT/2000/XP you can use the NetShareEnum to
> > > retrieve this info for the local or remote machines ... see
> > > http://www.mvps.org/vbnet/code/network/netshareenum.htm .. the first
col
> > > displayed is the share, the last the physical path.
> > > --
> > > Randy Birch
> > > MVP Visual Basic
> > > http://www.mvps.org/vbnet/
> > > Please respond only to the newsgroups so all can benefit.
> > > > I need to build a lookup table of local drive letter <> drive
> sharename.
> > > > drive share name = the name appearing under property page Explorer >
> > > Sharing
> > > > > Share As: Share Name.
> > > > I can enumerate the share names with IShellFolder - but don't see
any
> > way
> > > to
> > > > get the associated local drive letter.
> > > > I can enumerate the local drives with GetLogicalDrives or File
> Scripting
> > > > Host - but don't see any way to get the share name.
> > > > WNetGetConnection doesn't work - the share may not be mapped.
> > > > Same for WNetOpenEnum, WNetEnumResource .
> > > > I know the data is in registry under (W9x - not sure under NT, W2K &
> XP)
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan
Quote:
> > > > but registry browsing doesn't seem like a smart way to do this.
> > > > Can anyone point me to information about how to accomplish this?
> > > > Thanks,
> > > > --
> > > > Dale Sampson
> > > > http://www.dalesplace.net/download/