Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
LOCAL comp As IADsComputer, ;
serv As IADsService, ;
fserv As IADsContainer, ;
share As IADsFileShare, ;
shareNew As IADsFileShare, ;
v
*' Replace DOMAIN, SERVER & SHARE with the appropriate
*' domain, server and share names
share = GetObject("WinNT://DOMAIN/SERVER/lanmanserver/SHARE")
v = share.Path &&' Gets directory path on server
RELEASE share
*' Replace DOMAIN & SERVER with the appropriate domain and server names
fserv = GetObject("WinNT://DOMAIN/SERVER/lanmanserver")
*' Enumerate existing shares
For Each share In fserv
?share.Class,share.ADsPath,share.HostComputer,share.Path
ENDFOR
*' Create share in fileservice container
shareNew = fserv.Create("fileshare", "newshare")
shareNew.Path = "C:\"
shareNew.SetInfo &&' Commit new share
*' Delete share
fserv.Delete( "fileshare", "newshare" )
*' Fails since share is gone
shareNew.GetInfo
DECLARE INTEGER WNetAddConnection IN "mpr.dll" ;
STRING cRemoteName, ;
STRING cPassword, ;
STRING cLocalName
cResource = "\\MyServer\MyShare"
cPassword = "MyPassword"
cDriveLetter = "myDriverLetter:"
lnRetval = WNetAddConnection(cResource, cPassword, cDriveLetter)
note lnRetVal = 0 if successful and the password is not needed if the user is already logged in and has rights to the server directory. This does a map root of the cResource.
return (lnRetval)