سؤال

I'm writing a windows client application, and i wish to have a global unique identifier which is not generated by my application (I don't want to generate a GUID and save it locally).
Also - each application is installed separately for each windows user.

I have no problem uniquely identify the machine, but I'm not sure about uniquely identify user. i can use the logged in user's SID (security identifier), but i'm not sure what is the life span of SID.

Is the SID per user constant? Or perhaps it changes every session?

Any ideas on how to uniquely identify a user with a permanent ID?

(I want a pre-existing identifier, so i could detect returning users) Should be supported for Windows XP through Win7.

Thanks,

هل كانت مفيدة؟

المحلول

The SID for a given user is constant and will not change between sessions.

However, for domain accounts the same user has the same SID on multiple machines.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top