Hi,
I need a script that will give a group called btc\staff_sims_updates full permissions on the sims folder in program files.
I wonder if someone cna help
Thanks

Hi,
I need a script that will give a group called btc\staff_sims_updates full permissions on the sims folder in program files.
I wonder if someone cna help
Thanks
cacls "C:\program files\SIMS" /E /T /C /G "btc\staff_sims_updates":C
in a batch file or as part of your logon script
Works for us...
Matt

If this is for client machines just use the file system security bit in a GPO which results in a much cleaner implementation and does not require any scripting at all.
applying folder permissions through group policy
computer configuration/windows settings/security settings/file system
Right click add file, then you browse to the folder (if it is being done on the server and the folder is not there cerate it so you can find the path then you can set the permissions by double clicking the folder in the file system

Hi,
I have altered it so it will give full permisions and remove existing groups here is my code
but it is prompting for a yes or no. How would i make it so it automatically says yes?"C:\program files\SIMS" /T /C /G "btc\staff_sims_updates":f
thanks
Here is a snippet of something that does similar that i modified, some vars aren't needed but you get the idea, could alter as needed:
the 2 bolded bits are important, first one is path to folder that you want to add NTFS permissions, latter is to enumerate through an OU on AD, so you could go through the 'teachers' OU when ran on the DC, well i invoke through a scheduled task and it does something slightly different - similar in principal! This was made for something tottallly different but not alot of difference in what it does.Code:Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") dim pos Set objRoot = GetObject("LDAP://RootDSE") strDNC = objRoot.Get("DefaultNamingContext") Set objDomain = GetObject("LDAP://" & strDNC) ' Bind to the top of the Domain using LDAP using ROotDSE Dim fso Set fso = CreateObject("Scripting.FileSystemObject") Set wshShell = WScript.CreateObject ("WSCript.shell") '''''''''''''''''''''''''''' Call enummembers(objDomain)' '''''''''''''''''''''''''''' Sub enumMembers(objDomain) On Error Resume Next For Each objMember In objDomain ' go through the collection If ObjMember.Class = "user" Then SamAccountName = ObjMember.samAccountName strDetail = "xcacls a:\path-to-folder /e /g "&SamAccountName&":F /y" wshshell.run strDetail,7, true '''''''''''''''''' If objMember.Class = "organizationalUnit" or OBjMember.Class = "container" Then strDetail = objmember.adspath pos=InStr(1,strDetail,"SOME-OU",0) if pos > 0 then enumMembers (objMember) end if end if
Last edited by dwhyte85; 18th March 2009 at 02:02 PM.
Modify perms should be sufficient to enable the user to update SIMS.
If your trying to get users to update sims without being an admin i bleave there is a bat in sims\setups called simsperm you use it like this if its there
I:\Sims\Setups\Simsperm.bat "Domain\Group"
where I:\ is the share for your sims server
i do the above (simsperms.bat), but i use mine as a startupscript in a gpo for the staff workstations.
Create new group policy called simsperms
Go to windows startup scripts (machine settings)
Click Show files
Paste in subinacl.exe and the .bat file
Copy path from the window
Eg.
In the .bat prepend to all lines stating with subinaclCode:\\schoolname.county.sch.uk\SysVol\schoolname.county.sch.uk\Policies\{5BB037E4-9025-4685-A436-5D003B249635}\Machine\Scripts\Startup\
Eg.
becomesCode:subinacl /SUBDIRECTORIES "%ALLUSERSPROFILE%\Start Menu\Programs\SIMS Applications" /GRANT=%1=F
Or you could use:Code:\\schoolname.county.sch.uk\SysVol\schoolname.county.sch.uk\Policies\{5BB037E4-9025-4685-A436-5D003B249635}\Machine\Scripts\Startup\subinacl /SUBDIRECTORIES "%ALLUSERSPROFILE%\Start Menu\Programs\SIMS Applications" /GRANT=%1=F
which means you could doCode:Set simsgpopath=\\schoolname.county.sch.uk\SysVol\schoolname.county.sch.uk\Policies\{5BB037E4-9025-4685-A436-5D003B249635}\Machine\Scripts\Startup
save fileCode:%simsgpopath%\subinacl /FILE "%ALLUSERSPROFILE%\Start Menu\Programs\SIMS Applications" /GRANT=%1=F
apply parameters to script in the form domain\security group
That should do it.
There are currently 1 users browsing this thread. (0 members and 1 guests)