Article ID: 169398 - Last Review: March 29, 2007 - Revision: 3.3 How To Manipulate File Shares with ADSI (VB Sample)This article was previously published under Q169398 SUMMARY You can use Active Directory Service Interfaces (ADSI) to
manipulate file shares as shown in the Visual Basic sample code below.
MORE INFORMATION You must install the ADSI runtime (ADS.EXE) available from
www.microsoft.com/ntserver/info/adsi.htm, and then add a reference to Active DS
Type Library. Note: Windows 2000 includes the ADSI 2.5 run time. Installation of the above runtime is not required. The following code first gets a fileshare object on a server and reads its path property. Then it gets a fileservice object on a server, uses it to enumerate the shares on the server, creates a new share \\SERVER\newshare for C:\, and deletes the share it just created. You can omit the DOMAIN\ in the code below, but you may see some performance degradation caused by additional browsing to find the SERVER: REFERENCES For more informatioin about the ADSI specification, see the
following Microsoft Web site in the Platform Software Development Kit (SDK): http://msdn2.microsoft.com/en-us/library/aa772170.aspx
(http://msdn2.microsoft.com/en-us/library/aa772170.aspx)
APPLIES TO
| Article Translations
|
Back to the top
