This is great! Ive been looking for a way to change folder permisions for our apps the require Admin rights to run, but without giving full local admin rights. it works great when i input my AD user name but does not work if i enter "Domain Users". I modified the script to not promp and directly told it what user and folder to modify. (Script Below) Any idea what i could try to make it find a AD group VS a user?
$UID = "Domain Users";InputBox("Grant Access", "Enter the user ID")
$dir = "C:Temp";("Directory", "UNC path to parent directory")
$perm = "W";InputBox("Level of Access", "Enter the level of Access: C(hange), F(ull control), R(ead only), W(rite)")
While 1
$dir2 = "C:Temp";FileSelectFolder("Choose a folder.", $dir, 1)
RunWait( 'CACLS "' & $dir2 & '" /E /G ' & $UID & ':' & $perm, "", @SW_HIDE )
$ok = MsgBox(4, "Complete", "Would you like to specify another directory?")
If $ok = 7 Then ExitLoop
WEnd
MsgBox(0, "Access Granted", "Access has been granted to the specified directories.")