Reputation: 655
I am trying to store information in a central DB to track how many clients that have various versions of the app. I cannot locate any unique identification in WinRT that identifies the app instance. Does anyone know how I can track this?
Upvotes: 1
Views: 321
Reputation: 38077
If I understand what you are asking for, you could use is the Application Specific Hardware ID (ASHWID). For example:
Windows.System.Profile.HardwareToken hid = Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken(null);
var version = Package.Current.Id.Version;
Debug.WriteLine(hid.Id + " - " + version.ToString());
From the documentation:
Gets a hardware identifier (ASHWID) that represents the current hardware. The returned ASHWID will be different for each application package. In other words, this API will return different identifiers when called by two apps from different packages. It will return the same identifier when called by two apps that are part of the same package.
Upvotes: 1