Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharing

Status
Not open for further replies.

Matilde

Programmer
Nov 30, 2001
18
DK
I'm on a local network on my school, and I would like to know how you share a folder on the local network with VBScript!
 
Here is the example i use (map a network)
Code:
set wn=CreateObject("WScript.Network.1")
wn.MapNetworkDrive "i:","\\computername\sharename"
________
George, M
 


Matilde,

For W2k:

set srvObj = GetObject("WinNT://myserver/lanmanserver")
set newshare = srvObj.create("fileshare", ShrName)
newshare.path = "E:\dir\subdir"
newshare.description = "description here"
newshare.SetInfo

fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top