HISE Logo Forum
    • Categories
    • Register
    • Login

    How to get CPU serial number using HISE?

    Scheduled Pinned Locked Moved General Questions
    30 Posts 6 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan KorneffD
      Dan Korneff
      last edited by

      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:
      Screenshot 2025-01-15 120109.png Screenshot 2025-01-15 120126.png

      and added this to my project:
      Screenshot 2025-01-15 115949.png

      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 - Producer / Mixer / Audio Nerd

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Dan Korneff
        last edited by ustk

        @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... 🤷

        Can't help pressing F5 in the forum...

        Dan KorneffD 1 Reply Last reply Reply Quote 0
        • Dan KorneffD
          Dan Korneff @ustk
          last edited by

          @ustk I've changed the preprocessor in the module like this:

          Screenshot 2025-01-15 122032.png

          Still the same result 😞

          Dan Korneff - Producer / Mixer / Audio Nerd

          1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff
            last edited by

            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

            Dan Korneff - Producer / Mixer / Audio Nerd

            1 Reply Last reply Reply Quote 1
            • Dan KorneffD
              Dan Korneff
              last edited by

              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 - Producer / Mixer / Audio Nerd

              ustkU 1 Reply Last reply Reply Quote 0
              • ustkU
                ustk @Dan Korneff
                last edited by

                @Dan-Korneff yeah it can be troublesome to be sure both are working (hise and plugin)

                Can't help pressing F5 in the forum...

                1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff
                  last edited by

                  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 - Producer / Mixer / Audio Nerd

                  ustkU 1 Reply Last reply Reply Quote 1
                  • ustkU
                    ustk @Dan Korneff
                    last edited by

                    @Dan-Korneff Ouch! As it doesn't respect what the name says, that is very unfortunate!

                    Can't help pressing F5 in the forum...

                    1 Reply Last reply Reply Quote 0
                    • Dan KorneffD
                      Dan Korneff
                      last edited by

                      @Christoph-Hart I think this is the issue:
                      https://github.com/juce-framework/JUCE/commit/120f9266dc881c81371109c69b37a0a246accdeb

                      Is this fix already implemented?

                      Dan Korneff - Producer / Mixer / Audio Nerd

                      Christoph HartC 1 Reply Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart @Dan Korneff
                        last edited by

                        @Dan-Korneff welp it‘s time for a JUCE_EVEN_BETTER_MACHINE_IDS macro…

                        Dan KorneffD ustkU 3 Replies Last reply Reply Quote 3
                        • A
                          aaronventure
                          last edited by aaronventure

                          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.

                          Dan KorneffD 1 Reply Last reply Reply Quote 2
                          • Dan KorneffD
                            Dan Korneff @aaronventure
                            last edited by

                            @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 😀

                            Dan Korneff - Producer / Mixer / Audio Nerd

                            1 Reply Last reply Reply Quote 0
                            • Dan KorneffD
                              Dan Korneff @Christoph Hart
                              last edited by

                              @Christoph-Hart No rush. Just checking in for a friendly ETA.

                              Dan Korneff - Producer / Mixer / Audio Nerd

                              1 Reply Last reply Reply Quote 0
                              • Dan KorneffD
                                Dan Korneff @Christoph Hart
                                last edited by

                                @Christoph-Hart Would you want to give me a "this is how I would do it" outline and I could take a run at it? Just trying to manage the pitchforks. 🤠

                                Dan Korneff - Producer / Mixer / Audio Nerd

                                1 Reply Last reply Reply Quote 0
                                • ustkU
                                  ustk @Christoph Hart
                                  last edited by

                                  @Christoph-Hart said in How to get CPU serial number using HISE?:

                                  @Dan-Korneff welp it‘s time for a JUCE_EVEN_BETTER_MACHINE_IDS macro…

                                  Where are we at about this GENERATE_FOOL_PROOF_ID?

                                  Can't help pressing F5 in the forum...

                                  Dan KorneffD 2 Replies Last reply Reply Quote 0
                                  • Dan KorneffD
                                    Dan Korneff @ustk
                                    last edited by Dan Korneff

                                    @ustk I think the method can just be swapped out with the new one.
                                    I've been tinkering with implementation on this end. Lots of little hurdles backporting from juce 8. Got a huge stack trace to work out, but I've been too swamped to complete

                                    Dan Korneff - Producer / Mixer / Audio Nerd

                                    1 Reply Last reply Reply Quote 0
                                    • Dan KorneffD
                                      Dan Korneff
                                      last edited by Dan Korneff

                                      @Christoph-Hart Here's where I'm at:

                                      Link Preview Image
                                      begin update Machine IDs again (61455395) · Commits · Dan Korneff / HISE · GitLab

                                      The open source framework for sample based instruments

                                      favicon

                                      GitLab (gitlab.korneff.co)

                                      I'm currently stuck at

                                      Severity	Code	Description	Project	File	Line	Suppression State	Details
                                      Error	LNK2001	unresolved external symbol "public: __cdecl juce::juce::MemoryBlock::~MemoryBlock(void)" (??1MemoryBlock@juce@1@QEAA@XZ)	HISE Standalone_App	Z:\GitHub\HISE\projects\standalone\Builds\VisualStudio2022\include_juce_core.obj	1		
                                      Error	LNK2001	unresolved external symbol "public: __cdecl juce::juce::MemoryBlock::MemoryBlock(void)" (??0MemoryBlock@juce@1@QEAA@XZ)	HISE Standalone_App	Z:\GitHub\HISE\projects\standalone\Builds\VisualStudio2022\include_juce_core.obj	1		
                                      Error	LNK2001	unresolved external symbol "public: __cdecl juce::juce::MemoryBlock::MemoryBlock(unsigned __int64,bool)" (??0MemoryBlock@juce@1@QEAA@_K_N@Z)	HISE Standalone_App	Z:\GitHub\HISE\projects\standalone\Builds\VisualStudio2022\include_juce_core.obj	1		
                                      Error	LNK2001	unresolved external symbol "public: __cdecl juce::juce::MemoryBlock::MemoryBlock(class juce::juce::MemoryBlock &&)" (??0MemoryBlock@juce@1@QEAA@$$QEAV011@@Z)	HISE Standalone_App	Z:\GitHub\HISE\projects\standalone\Builds\VisualStudio2022\include_juce_core.obj	1		
                                      
                                      

                                      Any chance you could take a look? (ignore the image file stuff..)

                                      Dan Korneff - Producer / Mixer / Audio Nerd

                                      1 Reply Last reply Reply Quote 0
                                      • Dan KorneffD
                                        Dan Korneff
                                        last edited by

                                        zolu.gif

                                        Dan Korneff - Producer / Mixer / Audio Nerd

                                        1 Reply Last reply Reply Quote 1
                                        • Dan KorneffD
                                          Dan Korneff @ustk
                                          last edited by

                                          @ustk Got it sorted. Sending to beta for testing now.

                                          Dan Korneff - Producer / Mixer / Audio Nerd

                                          1 Reply Last reply Reply Quote 1
                                          • Dan KorneffD
                                            Dan Korneff
                                            last edited by

                                            @Christoph-Hart @ustk Confirmed working:

                                            Link Preview Image
                                            finalize UniqueID: Use stable SMBIOS fields to generate ID on Windows (70837bae) · Commits · Dan Korneff / HISE · GitLab

                                            The open source framework for sample based instruments

                                            favicon

                                            GitLab (gitlab.korneff.co)

                                            It requires 2 new files:
                                            juce_Span.h
                                            juce_EnumHelpers.h

                                            and edits to:
                                            juce_core.h
                                            juce_win32_SystemStats.cpp
                                            juce_SystemStats.cpp
                                            juce_OnlineUnlockStatus.cpp

                                            Dan Korneff - Producer / Mixer / Audio Nerd

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            15

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.8k

                                            Posts