Here is the problem.
I need to run a Windows Service which is being configured through registry.
Is there any way to modify another user HKCU without enumeration all the users on the machine?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have found good way to do it through WMI interface.
I’ve opened connectioin to WMI (see there: http://msdn.microsoft.com/en-us/library/aa390423%28v=vs.85%29.aspx).
Next, I’ve enumerated all the items in Win32_Account database.
Each item in win32_Account have Domain, Name and SID fields.
That’s the way to get correct SID.
Unfortunately, I still don’t know how to make this operation without enumerating all the users.
Also, this method enumerates all the users in domain (even if they never log on to local machine).