Hi all,
short question .... how to make a newly installed folder a share?
I have to set a few directory shares after xcopyed the directory tree onto the target machine.
thanks in advance,
Thomas
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Share Folder
Started by
<TM>
, Jul 29 2005 11:17
3 replies to this topic
Posted 21 December 2005 - 06:42
Hi ,
I think you need to create a Custom action with vbscript. and run the CA after the Xcopy.
please let me know if you need the script for sharing the folder.
i hope this help you.
Regards,
Shekhar
I think you need to create a Custom action with vbscript. and run the CA after the Xcopy.
please let me know if you need the script for sharing the folder.
i hope this help you.
Regards,
Shekhar
Posted 13 February 2006 - 19:31
Even if Thomas doesn't need it, I would like to see the script
thanks,
jrcoldinmn

thanks,
jrcoldinmn
Posted 15 February 2006 - 15:38
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.")
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.")
