hendrikhe Posted August 23, 2017 Share Posted August 23, 2017 Hello, I am trying to change folder permission (full, read and write: F) for current user´s Desktop. Its working for the user "localadmin". But for some reason I am not able to grant this group permission: computerID\Administrators. Attached screenshot I added computerID\Administrators manually. With script it is not even listed $UID = @ComputerName & "\localadmin" $UID2 = @ComputerName & "\Administrators" $perm = "F" $dir2 = "\\" & @ComputerName & "\d$\data\"& @UserName & '\' & "Desktop" RunWait( 'CACLS "' & $dir2 & '" /E /G ' & $UID & ':' & $perm, "", @SW_HIDE ) RunWait( 'CACLS "' & $dir2 & '" /E /G ' & $UID2 & ':' & $perm, "", @SW_HIDE ) Link to comment Share on other sites More sharing options...
Developers Jos Posted August 23, 2017 Developers Share Posted August 23, 2017 What does this tell you in the cmd windows that will stay open now: $UID = @ComputerName & "\localadmin" $UID2 = @ComputerName & "\Administrators" $perm = "F" $dir2 = "\\" & @ComputerName & "\d$\data\"& @UserName & '\' & "Desktop" RunWait( @Comspec & ' /k CACLS "' & $dir2 & '" /E /G ' & $UID & ':' & $perm, "") RunWait( @Comspec & ' /k CACLS "' & $dir2 & '" /E /G ' & $UID2 & ':' & $perm, "" ) Any Errors? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
hendrikhe Posted August 23, 2017 Author Share Posted August 23, 2017 (edited) I changed $UID2 = @ComputerName & "\Administrators" to $UID2 = "Administrators" and it worked! Edited August 23, 2017 by hendrikhe Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now