Same Device Unique Identifier in two different Windows Universal Apps RRS feed

  • Question

  • I am developing windows universal apps. I want to get same device unique id in two different apps installed on the same device. I am getting different unique id even after changing Publisher Id. My code snippet is below. 

    HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null);
    IBuffer hardwareId = token.Id;
    HashAlgorithmProvider hasher = HashAlgorithmProvider.OpenAlgorithm("MD5");
    IBuffer hashed = hasher.HashData(hardwareId);
    string hashedString = CryptographicBuffer.EncodeToHexString(hashed);
    return hashedString;

    Is there any other way to achieve this?

    Wednesday, June 18, 2014 10:27 AM

All replies

  • What you're saying doesn't really make sense to me. Doesn't the device have it's own unique id already via it's driver?  And then you use that unique id in other apps?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, June 18, 2014 12:36 PM