CodeHog Posted Friday at 05:20 PM Posted Friday at 05:20 PM I am trying to automate assigning custom names to my Windows ShellNew templates. Most are located in user SID hives that have a unique identifier number and, therefore, I can't write a registry script to modify them. Is there a way to acquire that registry key number with an Autoit script and then modify values under the key?
WildByDesign Posted Friday at 10:54 PM Posted Friday at 10:54 PM Is it the actual SID's that you are trying to get? Do you have the usernames to perform the lookups? Something like this: #include <Security.au3> Local $sAccount = @UserName Local $tSID = _Security__GetAccountSid($sAccount) Local $sStringSID = _Security__SidToStringSid($tSID) ConsoleWrite("User = " & $sAccount & @CRLF & "SID = " & $sStringSID & @CRLF) Local $sAccount = 'NetworkService' Local $tSID = _Security__GetAccountSid($sAccount) Local $sStringSID = _Security__SidToStringSid($tSID) ConsoleWrite("User = " & $sAccount & @CRLF & "SID = " & $sStringSID & @CRLF) Local $sAccount = 'LocalService' Local $tSID = _Security__GetAccountSid($sAccount) Local $sStringSID = _Security__SidToStringSid($tSID) ConsoleWrite("User = " & $sAccount & @CRLF & "SID = " & $sStringSID & @CRLF) Local $sAccount = 'System' Local $tSID = _Security__GetAccountSid($sAccount) Local $sStringSID = _Security__SidToStringSid($tSID) ConsoleWrite("User = " & $sAccount & @CRLF & "SID = " & $sStringSID & @CRLF) If this is what you are looking for, you can substitute that for the registry values under HKEY_USERS. Permissions for some of these keys are a whole different ballgame though. The Permissions UDF may be beneficial if needed.
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