I want to create a network share using vbScript.
Is there a way of doing this other than executing a "net share" command?
e.g.
Set shell = CreateObject("WScript.Shell")
shell.Run "net share sc1=" & sShare , 1, false
vbscript
I want to create a network share using vbScript.
Is there a way of doing this other than executing a "net share" command?
e.g.
Set shell = CreateObject("WScript.Shell")
shell.Run "net share sc1=" & sShare , 1, false
Best Answer
Use WMI via vbscript.
Taken from http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/filesfolders/sharedfolders/#CreateNetworkShare.htm