This doc provides a little script to lookup the SID for a user (so that you can browse the right place in the registry).
http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/hey1203.mspx
---
I couldn't get the above to work - missing a library or something; however the code in this thread worked well:
http://groups.google.com/group/microsoft.public.windows.server.scripting/browse_thread/thread/49ab074d46eee0ef/83b5a306de01a113?lnk=st&q=get+user+sid&rnum=1#83b5a306de01a113
WScript.Echo "User SID: " & GetUserSID
Function GetUserSID()
' Author: Torgeir Bakken
Dim sUserSID, oWshNetwork, oUserAccount
Set oWshNetwork = CreateObject("WScript.Network")
sUserSID = ""
On Error Resume Next
Set oUserAccount=GetObject( _
"winmgmts://" & oWshNetwork.UserDomain & "/root/cimv2") _
.Get("Win32_UserAccount.Domain='" & oWshNetwork.ComputerName & "'" _
& ",Name='" & oWshNetwork.UserName & "'")
GetUserSID = oUserAccount.SID
End Function
--------
Or grab a copy of getsid.exe from Microsoft's Windows 2000 Resource Kit - usage on a standalone workstation appears redundant at first:
getsid \\mylaptop lchan \\mylaptop lchan
tags: sid, user, getsid.exe, !guid