Hi,

Could anyone please suggest how to share a folder using wise package studio.

For example, I want to share a folder c:\program files\Talis

What do I need to do in Wise so that once application is installed this folder is share to maximum allowed people?

Please advise.

Thanks
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I honestly don't think a package is the right place to perform that operation but you could use the NET SHARE syntax or, better, build a script that uses the WMI class Win32_Share. I would imagine somewhere like computerperformance.co.uk would have a suitbale script which you could use as a template.
Answered 06/16/2009 by: VBScab
Red Belt

Please log in to comment
0
NET SHARE ORIGINAL: VBScab

I honestly don't think a package is the right place to perform that operation but you could use the NET SHARE syntax or, better, build a script that uses the WMI class Win32_Share. I would imagine somewhere like computerperformance.co.uk would have a suitbale script which you could use as a template.



Thanks Ian. NET SHARE seems to be working as required....
Answered 06/16/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
As ever, a script offers better error-trapping, as opposed to next to none in a command file and definitely none if you're calling NET.EXE directly. I prefer my Custom Actions to know and report whether or not they succeeded.
Answered 06/16/2009 by: VBScab
Red Belt

Please log in to comment
0
Hi,

Include this code in your custom action (call VBScript from embedded code)

[font="courier new"]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:\temp\test", "anySharename", FILE_SHARE, MAXIMUM_CONNECTIONS, "any remarks")

[font="courier new"]if errReturn = "0" then
wscript.echo "Success"
else
wscript.echo "Task Failed"
end if


Place the custom action in execute deffered after file copy std action

in case you need to set additional permssions use SetACLS.exe or equivalent executable

Regards
Emmy
Answered 06/16/2009 by: emmy12
Senior Yellow Belt

Please log in to comment
0
ORIGINAL: emmy12

Hi,

Include this code in your custom action (call VBScript from embedded code)

[font="courier new"]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:\temp\test", "anySharename", FILE_SHARE, MAXIMUM_CONNECTIONS, "any remarks")

[font="courier new"]if errReturn = "0" then
wscript.echo "Success"
else
wscript.echo "Task Failed"
end if


Place the custom action in execute deffered after file copy std action

in case you need to set additional permssions use SetACLS.exe or equivalent executable

Regards
Emmy


Thanks Emmy, what do I need to do if i have to put maximum allowed instead of 25 number.

Also, what if I don't have to put any sharename and any remarks??

Pl suggest
Answered 06/16/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
Also, what if I don't have to put any sharename and any remarks?? http://msdn.microsoft.com/en-us/library/aa394435(VS.85).aspx
Answered 06/16/2009 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity