PC Review Forums Newsgroups Windows 2000 Microsoft Windows 2000 Registry Finding Current User's SID in Windows 2000 Server & Windows XP

Reply

Finding Current User's SID in Windows 2000 Server & Windows XP

 
Thread Tools Rate Thread
Old 23-09-2004, 08:22 PM   #1
Ron Sochanski
Guest
 
Posts: n/a
Default Finding Current User's SID in Windows 2000 Server & Windows XP


Hello. An installation program of mine can successfully
install on Windows 9.x and Windows 2000 Professional, but
not on Windows 2000 Server or Windows XP. Specifically,
the program generates an error and halts when it cannot
find the current user's SID, which on all Windows
9.x/Windows 2000 Professional systems I've encountered, is
contained as value data in the value named OwnerSID of the
following registry key:

HKLM\SOFTWARE\Microsoft\EventSystem\{26c409cc-ae86-11d1-
b616-00805fc79216}\Subscriptions\{6295DF30-35EE-11D1-8707-
00C04FD93327}

Windows 2000 Server and Windows XP don't appear to use
this key, thus the error described above. Furthermore, I
looked through the Windows 2000 Server registry hoping to
find another key that has a value whose data is the SID,
but can't seem to find one. How can I get the current
user's SID from Windows 2000 Server and Windows XP? Any
help would be greatly appreciated!

Thank you.

Ron Sochanski
  Reply With Quote
Old 23-09-2004, 09:49 PM   #2
Mark V
Guest
 
Posts: n/a
Default Re: Finding Current User's SID in Windows 2000 Server & Windows XP

In microsoft.public.win2000.registry Ron Sochanski wrote:

> Hello. An installation program of mine can successfully
> install on Windows 9.x and Windows 2000 Professional, but
> not on Windows 2000 Server or Windows XP. Specifically,
> the program generates an error and halts when it cannot
> find the current user's SID, which on all Windows
> 9.x/Windows 2000 Professional systems I've encountered, is
> contained as value data in the value named OwnerSID of the
> following registry key:
>
> HKLM\SOFTWARE\Microsoft\EventSystem\{26c409cc-ae86-11d1-
> b616-00805fc79216}\Subscriptions\{6295DF30-35EE-11D1-8707-
> 00C04FD93327}
>
> Windows 2000 Server and Windows XP don't appear to use
> this key, thus the error described above. Furthermore, I
> looked through the Windows 2000 Server registry hoping to
> find another key that has a value whose data is the SID,
> but can't seem to find one. How can I get the current
> user's SID from Windows 2000 Server and Windows XP? Any
> help would be greatly appreciated!


This tool
C\UTIL\SysInternals>psgetsid %username%

PsGetSid v1.41 - Translates SIDs to names and vice versa
Copyright (C) 1999-2004 Mark Russinovich
Sysinternals - www.sysinternals.com

SID for W2K\USER:
S-1-5-21-796845957-839522115-nnnnnnnnnn-1000

Might help. They don't seem to have source code for this tool and I
do not know what APIs are utilized. Admin. authority required.

- - -

You might enumerate:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
\ProfileList\
perhaps. For local profiles.

Not sure any of that helps.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off