sully25 Posted November 2, 2011 Share Posted November 2, 2011 Hello everybody, i am new in this Forum and I have some questions regarding autoit. I whant over autoit to set some rights for some folders. Example: c:\Windows\system32\cacls.exe c:\program files\folder /T /E /G users:F MY problem:I am having problems regarding the system language. Is there a variable for USERS so that no mather witch system language is the rights could be set?I whant to use this for :xp 32 bit eng and gerxp 64 bit eng and ger MUIwin7 32 and 64 bit all I also used this but it thoesn´t work.The system ist xp 64 english and a MUI pack is installed so instead of users it is used benutzer witch is wrong.If I try to use users it is working. lobal $UserLang = @OSLang if $UserLang = "0409 0809 0c09 1009 1409 1809 1c09 2009 2409 2809 2c09 3009 3409" Then global $user = " users" else global $user = " benutzer" EndIf Thank You Link to comment Share on other sites More sharing options...
JFX Posted November 2, 2011 Share Posted November 2, 2011 The Group Users have the SID: S-1-5-32-545 so this should give you the right name #Include <WinAPI.au3> #Include <Security.au3> $User = _Security__LookupAccountSid("S-1-5-32-545") if @error Then MsgBox(16, "Error", _WinAPI_GetLastErrorMessage()) Else MsgBox(0, "S-1-5-32-545", $User[0]) EndIf Link to comment Share on other sites More sharing options...
sully25 Posted November 2, 2011 Author Share Posted November 2, 2011 Super Danke. Werde gleich mal ausprobieren Link to comment Share on other sites More sharing options...
sully25 Posted November 2, 2011 Author Share Posted November 2, 2011 Hi thank You, how do I insert the value for $User for this? c:\Windows\system32\cacls.exe c:\program files\folder " /T /E /G" & $User & ":F" Is this Ok? Link to comment Share on other sites More sharing options...
sully25 Posted November 2, 2011 Author Share Posted November 2, 2011 Doesn´t matter. Problem solved Thank YOU 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