Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Security ID

Status
Not open for further replies.

aspnetvbnetnerd

Programmer
Feb 3, 2008
31
SE
How can I get Security ID from the current logged on user?
 
Security ID for what?

-Sometimes the answer to your question is the hack that works
 
The SID.

I don't know how to get information about if the user uses Windows Classic Style or Windows XP Style for button.

I used Regshot to se what happenes to the registry when you change the settings for Control panel --> Display --> Appearance -- Windows XP Style (Windows and buttons) and found out that these values changes
Code:
HKU\S-1-5-21-1409082233-1935655697-725345543-1003\Software\Microsoft\Windows\CurrentVersion\ThemeManager\LoadedBefore: "1"
HKU\S-1-5-21-1409082233-1935655697-725345543-1003\Software\Microsoft\Windows\CurrentVersion\ThemeManager\LastUserLangID: "1033"
HKU\S-1-5-21-1409082233-1935655697-725345543-1003\Software\Microsoft\Windows\CurrentVersion\ThemeManager\DllName: "%SystemRoot%\resources\Themes\Luna\Luna.msstyles"
HKU\S-1-5-21-1409082233-1935655697-725345543-1003\Software\Microsoft\Windows\CurrentVersion\ThemeManager\ColorName: "NormalColor"
HKU\S-1-5-21-1409082233-1935655697-725345543-1003\Software\Microsoft\Windows\CurrentVersion\ThemeManager\SizeName: "NormalSize"
.

I could use the SID to read in the registry to se what kind of button style the user uses.

From that I can adapt the application menu to the user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top