create electron atom application via hardware information

I need to create a desktop application. Since lately I 've been using constantly javascript for my mobile html5 apps I was thinkning of using electron atom (former Atom Shell) to develop the desktop one.

The problem is that my client needs to be able to lock his application using hardware information like motherboard serial number or cpu id.

This is quite easy using usual desktop dev languages like c++, java e.t.c.

Can you imagine a way of fetching such information using javascript frameworks like electron atom?

For example cordova allows to develop plugins (using java for example for android apps). Is there something similar in electron atom.

Upvotes: 1

Views: 1480

Answers (1)

Luiz Lago
Luiz Lago

Reputation: 2659

That UUID is the best way to ID a machine, it exists in Windows, Mac and many other platforms. It is a 32 characters in length, universally unique identifier. You can run the above wmic command to get it.

You can make this using npm module called machine-uuid (https://www.npmjs.com/package/machine-uuid)

require("machine-uuid")(function(uuid) {
  console.log(uuid)
})

Upvotes: 6

Related Questions