/build/static/layout/Breadcrumb_cap_w.png

share a folder using wise?

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

Answers (6)

Posted by: anonymous_9363 14 years ago
Red Belt
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.
Posted by: djain3 14 years ago
Second Degree Blue Belt
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....
Posted by: anonymous_9363 14 years ago
Red Belt
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.
Posted by: emmy12 14 years ago
Senior Yellow Belt
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
Posted by: djain3 14 years ago
Second Degree Blue Belt
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
Posted by: anonymous_9363 14 years ago
Red Belt
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ