Dim Fso
Dim WshShell
Set Fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
cmdline = "net share " & "ShareNameHere" & "=" & "FolderNameHere"
Return = WshShell.Run(cmdline, 0, TRUE)
I keep getting the VBScript compile error (2740). When I run this code outside of WI, it works.