Hi everyone, I have an assignment that requires to package ClearCase Client 2003. One of the requirements of this job is creating a Shared Folder D:\Reports with Full Local Admin Access. I am using setacl.exe v2.x. and v0X Old. I need to create a batch file that adds share, sets new user group (For Shared Folder) and reconfigures permissions. By Windows default Shared Folder Permissions set to Everyone but folder it’s self set with Local Admins, Power Users, Local Users. I have managed to change permissions on the folder, but to add share with the right settings is a challenge. If anyone knows how to do this please reply. I would appreciate it. Thanks an advance guys.

Here is what is going on:

@echo off

setacl -on "D:\test" -ot file -actn ace -ace "%computername%\administrators;p:full" /silent

setacl "D:\test" /dir /grant %computername%\Administrators /full /silent
setacl "D:\test" /dir /grant %computername%\users /write /Change /silent
setacl "D:\test" /dir /grant %computername%\Power Users /full /silent

0 Comments   [ - ] Hide 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.
Answer this question or Comment on this question for clarity


You can try RMTShare.exe. It is found in the Windows NT Resource Kit and works on Windows 2000 and 2003.

See here for more details:

and here:
Answered 09/26/2005 by: TomB
Orange Belt

Please log in to comment
Thanks a lot, I have used combination of Batch file with VBScript here are the results:

To create a folder use standard DOS command:

@echo off
MD D:\Test

rem Then Call VBScript from batch file: Call Share.vbs

Which looks like this:

Const FILE_SHARE = 0

strComputer ="." '(You can use Machine Name or a list of Computers or a group)
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")

Set objNewShare = objWMIService.Get("Win32_Share")

errReturn = objNewShare.Create _
("D:\Test", "ClearCase_Reports", FILE_SHARE, _
MAXIMUM_CONNECTIONS, "ClearCase Report Folder for Developers.")

After the folder is created and shared you add permitions, in my case I had to give Full Rights to Local Users.

setacl "D:\test" /dir /grant %computername%\users /full /silent

It works and it's silent.
Answered 09/27/2005 by: vnaumoff
Senior Yellow Belt

Please log in to comment
I thought you wanted to set permissions on the share you create?

It seems not though so I guess you could have just used the net share command in your batch file and skip the vb script..?

Might have been easier but if it works it works... [;)] Or am I missing something?

Answered 09/27/2005 by: MSIPackager
Third Degree Black Belt

Please log in to comment