Professor Frink Posted September 2, 2004 Posted September 2, 2004 This is something I posted in the Windows XP forum:For IE - how do I get "text size" setting to stay?I thought I'd also ask here, because this is really more of an unattended thing, anyway. Here is my problem with setting permissions on a reg key -- I understand the general idea. For example, let's say that I have all of the following files in WINNT:regini.exeexample.batexample.iniI create a batch file that uses regini to call an ini file:example.batc:\WINNT\regini.exe c:\WINNT\example.iniexample.ini\Registry\Machine\Software [1 5 8]In that example, on the registry key HKEY_LOCAL_MACHINE\Software, it sets the permissions as such:Administrators group -- Full Control Creator/Owner group -- Full Control Everyone group -- Read permissionHere is my problem. According to the following KB article:Use a Script to Change Registry Permissions from the Command Linethe different registry Hives are translated as follows:HKEY_LOCAL_MACHINE = \Registry\Machine HKEY_USERS = \Registry\Users HKEY_CURRENT_USER = \Registry\User\User_SID (where User_SID is the current user's security identifier)But the main point of this exercise for me is an HKCU registry key:HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\International\Scripts\3Doesn't the SID change with every install? If so, how am I supposed to set permissions on the key in my install? Unless the SID is the same at the cmdlines.txt stage.... I don't know.
CoffeeFiend Posted September 2, 2004 Posted September 2, 2004 The SID (Security ID) change with every install (which is also why you can't "straight" clone NT/2k/xp/2k3 boxes on a network, they have to have their own - newsid/sysprep takes care of it...)But - you could try to dynamically get the user's SID and use that instead of a hardcoded one. You could use GetSID (my microsoft).link to GetSID:http://www.microsoft.com/windows2000/techi...ng/getsid-o.asp
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