Zaks.Shares : An ASP Component for Administrating NetWork Shares
Version : 1.01
Release Date : 13 January 1999
Copyright (c) 1998-1999 by Simon Fell. All rights reserved.
Contact:
email : Simon Fell
WWW : Zaks Solutions Web Site
If you have any problems using this component please report it.
Description
Zaks.Shares allows for the viewing, adding & deleting of network shares.
Installation Instructions
To use this ASP component move the DLL into a sub directory
(like \winnt\system32\inetsrv\asp\Cmpnts or \winnt\system32) and run
(from the directory copied to)
regsvr32 Shares.dll
License Agreement
Zaks.Shares is copyright (C) 1998-1999 by Simon Z. Fell
Zaks.Shares is free to download and use.
You may NOT redistribute the package through BBS, Internet, FTP sites or by any other means without
written permission from the Author.
You are prohibited from:
charging a fee or requesting donations for the package;
modifying the package.
All trademarks/registered names acknowledged.
Zaks.Shares is provided as is, without warranty of any kind.
The author shall not be liable for damages of any kind.
Use of this software indicates you agree to this.
How To Use
Example ASP & WSH scripts are included in the download
Object Properties / Methods
All the code snippets assume that set zs = Server.CreateObject("Zaks.Shares") has already been called.
- Collection : Shares (Server, ShareType, ShowHidden, ShowPath) : This returns a collection of ShareInfo items
describing the shares that match the search criteria.
Server is the name of the server to check in UNC Format (\\ServerName), or can
be left blank ("") for the local machine.
ShareType is the type of Share to look for, and can be one of the following values,
FileShares = 1, PrinterShares = 2, DeviceShares = 3, IPC Shares = 4. If not specified ShareType defaults to FileShares (1).
ShowHidden, if set to true, the returned collection will include any hidden or system shares (denoted by a trailing $ sign on the share name).
ShowHidden default to false if not specified.
ShowPath, if set to true, will populate the path property in the share info object. If set to false (the default), then the path property is not
populated.
If ShowPath is specified, then server operator rights are required to complete the request.
for each share in zs.Shares("") ' this machine, file shares, no hidden
response.write share.Name
next
for each share in zs.Shares("\\AnotherServer" , 2, true) ' Show shared printers on AnotherServer
response.write share.Name
next
- Function : Add (Server, Name, Path, Comment) : Adds a new file share to the specified server.
Name is the name of the new share, Path is the phyical path to share. You can also optionaly specify a comment for the new share.
Server operator rights are required to succesfully use this function.
zs.Add "" , "SimonsShare", "d:\users\simon"
zs.Add "\\USRServer" , "SFell$", "c:\users\simon" , "Home Directory for Simon Fell"
- Function : Delete (Server, Name) : Deletes the named share on the specified server.
Server operator rights are required to succesfully use this function.
zs.Delete "" "SimonsShare"
zs.Delete "\\USRServer", "SFell$"
- The ShareInfo object (as returned in the Shares collection), contains the following read only properties.
Last Updated : Friday, January 15, 1999 (C) 1997 - 1999 Simon Fell, All rights reserved
|