Sign in to follow this  
Followers 0
DirtDBaK

Setting Shared Folder Permissions - Or Just Sharing the folder!

3 posts in this topic

#1 ·  Posted (edited)

I need my script to create a folder, which I know how to do, BUT I need that folder to be shared over the network as read-only...

Any Ideas on how to solve this problem?

Thanks for all the help

Edited by DBak

[center][/center]

Share this post


Link to post
Share on other sites



@Dbak

Maybe this can get you going

Const $FILE_SHARE = 0
Const $MAXIMUM_CONNECTIONS = 25

$strComputer = "."
$objWMIService = $GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")

$objNewShare = $objWMIService.Get("Win32_Share")

$Return = $objNewShare.Create ("C:\Finance", "FinanceShare", $FILE_SHARE, _
                                $MAXIMUM_CONNECTIONS, "Public share for the Finance group.")

For Permissions see my signature SETACL

Regards

ptrex

Share this post


Link to post
Share on other sites

Thanks this will help me out the amp media server!


[center][/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0