The Active Network
ActiveWin Anonymous | Create a User | Reviews | News | Forums | Advertise | Career Portal | VBA in Excel | Users Online: 0  
 

Recommended Links:

Play your favourite online pokies and take what you win fast at the same day withdrawal online casinos in Australia.

Now, you can buy real Instagram followers.

AWBridal Highly Recommend Wedding & Bridesmaid Dress Online Store

light tower

buy arabic Twitter follower

buy spotify real followers

A great website to buy Facebook followers from is BRSM. They have a great track record!

the Binary Option Robot

Get Windows Tablet & Phones at DHgate.com

neowin.net

Amazon.com

  *  

How to build a share for Mac Fileserver with ADSI/VBS
Forum: Windows 2000
Read Only Forum
Back to Windows 2000
All Forums
  Displaying Posts 1 through 2 of 2
  This is an archived static copy of ActiveWin.com.
#1 By 125 (216.232.67.238) at Friday, February 28, 2003 02:18:17 PM
Let's make sure I understand your question... You want to create a new share on the Win2K Server programatically with VBScript using WMI calls (ADSI doesn't apply here)? If so here's an example direct from Microsoft: [b]Create a Network Share[/b] [i]Description[/i] Creates a shared folder named FinanceShare, setting the maximum number of simultaneous connections to 25, and adding a share description. [i]Script Code [/i] [CourierNew]Const FILE_SHARE = 0 Const MAXIMUM_CONNECTIONS = 25 strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objNewShare = objWMIService.Get("Win32_Share") errReturn = objNewShare.Create _ ("C:\Finance", "FinanceShare", FILE_SHARE, _ MAXIMUM_CONNECTIONS, "Public share for the Finance group.") Wscript.Echo errReturn[/CourierNew] All sorts of scripting examples can be found at the TechNet Script Center: http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp

This post was last edited by astorrs on Friday, February 28, 2003 2:22:44 PM.

#2 By 125 (216.232.67.238) at Monday, March 03, 2003 01:21:25 PM
Not sure on how to set the permissions via WMI. Download the Scriptomatic tool from Microsoft and have a look through the different APIs available. As for using it from a Macintosh, as long as the Macs and PCs are both using the same network protocol (TCP/IP, IPX, etc) then the Macs should be able to see the share automatically (Macs support SMB by default).



 

  *  
  *   *
 
replica watches