How to get CPU serial number using HISE?
-
@ustk
Do I have to use this when I compile HISE, or do I use it when I compile the plug-in?Thank you
Oli -
@Oli-Ullmann Both, otherwise the ID created will not be the same during test and production.
Once you use this flag it's forever for compatibility reasons
It should be set totrue
by default imho, but I think it's for breaking old project compatibility that it'sfalse
... @Christoph-Hart ? -
@ustk
All right, that makes sense. Thanks for the info! :-) -
I'm not sure what I'm doing wrong here, but HISE and my compiled plugin can't agree on a "better" machine ID.
I've compiled HISE like this:
and added this to my project:
When I launch the plugin, it detects that the ID is different and I update my license file. Then when I load HISE, it still thinks that the ID is different. What am I doing wrong?
-
@Dan-Korneff Have you tried to set it in the 'Modules` tab instead? That's what I do because I always think some pre-processor aren't working, that might be the case for this one...
-
@ustk I've changed the preprocessor in the module like this:
Still the same result
-
It appears to be something with the exported plugin. The machine IDs generated with JUCE_USE_BETTER_MACHINE_IDS=1 are the same as if it's set to false. At least I know where to start looking
-
Ok... I've obviously have not had enough coffee today. I'd probably have to export the plugin after I rebuild HISE for something to take effect.
Ignore my stupidity for now. -
@Dan-Korneff yeah it can be troublesome to be sure both are working (hise and plugin)
-
I'm using JUCE_USE_BETTER_MACHINE_IDS=1 in my new project. It's mostly working well, but I have a couple Windows 11 users that have to reactivate their license every few reboots. Is there a way to list the devices that are used to create this number so I can debug what is changing on their system?
-
@Dan-Korneff Ouch! As it doesn't respect what the name says, that is very unfortunate!
-
@Christoph-Hart I think this is the issue:
https://github.com/juce-framework/JUCE/commit/120f9266dc881c81371109c69b37a0a246accdebIs this fix already implemented?
-
@Dan-Korneff welp it‘s time for a JUCE_EVEN_BETTER_MACHINE_IDS macro…
-
You can fetch the MachineGuid that Windows creates on install using powershell. Here's how you do it in HISE:
const BackgroundTask = {}; BackgroundTask.getMachineGuid = Engine.createBackgroundTask("GetMachineGUID"); inline function getMachineGuid() { local command = "reg"; local args = [ "query", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography", "/v", "MachineGuid" ]; local logFunction = function(thread, isFinished, data) { if (!isFinished) { var id = data.substring(data.indexOf("REG_SZ")+6, data.length).trim(); Console.print(id); } }; BackgroundTask.getMachineGuid.runProcess(command, args, logFunction); } getMachineGuid();
A bit silly function naming since it won't return anything, but you get the gist.
-
@aaronventure I've created an app that displays the system ID with the Engine.getSystemID() function. I was looking for something that displayed the items in the system that were used to create the numbers.
Ultimately, it looks like there's a fix available from JUCE. Looking forward to the update