LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

protection of vi by mac address

Hallo,

 

I am new to labview. I am trying to protect a VI by mac address so that it can be used on a single PC only. I searched for tutorials, but I got nothing. Is there any tutorial or example VI from where I can get some help.

 

Thank for your support. 

 

 

Wenshu
0 Kudos
Message 1 of 12
(3,123 Views)

Hi ,

 

read the MAC address using SysExec ("ipconfig /all"), then compare with a pre-defined number.

 

What exactly is your problem? Where are you stuck?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(3,114 Views)

For example, consider any simple vi . How can i protect the VI with mac address of specific computer so that it runs only on specific PC. and when other PC tried to runs the same VI, it shows error or does not run on other PC. I am stuck how to do it because there is no tutorial regarding this. 

Wenshu
0 Kudos
Message 3 of 12
(3,065 Views)

Hi Wenshu,

 

despite changing your alias my answer from message #2 doesn't change.

Have you tried that?

 

Can you attach your approach in your VI? Where are you stuck?

 

(Btw. when you search the LabVIEW board for "read MAC address" you find a lot of related threads.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(3,063 Views)

If it is a a computer specific ID you are after and no specifically a mac address, you could also use generateComputerID.exe from <Program Files>\National Instruments\Shared\License Manager\Bin\ and run it with System Exec.vi.

 

 

Certified LabVIEW Architect
0 Kudos
Message 5 of 12
(3,047 Views)

Yes, I just want to protect the vi so that it can run on only one computer and it can't be run on other PCs. 

I will look at the example of generateComputerID.exe with System Exec.vi and will return to you. Thanks for the help. 

Wenshu
0 Kudos
Message 6 of 12
(3,038 Views)

Would this approach work on a MAC?

0 Kudos
Message 7 of 12
(2,801 Views)

It would as long as you find similar commands on the Macintosh that will give a network adapter's MAC address.

0 Kudos
Message 8 of 12
(2,789 Views)

Thanks you for the reply. This helps.

 

I am new to coding and LabVIEW. I wrote a program using approach (assuming that I would not have to worry about read MAC address based on OS) shown on this page:

How Can I Get The MAC Address From My RT Target? 

 

What would be the drawbacks of using this approach?

It takes up to 2% of CPU usage

0 Kudos
Message 9 of 12
(2,783 Views)

If it is continuously using 2% of your CPU, then you should reconsider your architecture. Why do you need to repeatedly check the MAC address?

Probably you can check it once at the beginning of your application, then either continue or stop/abort (assuming the same requirement as the OP).

 

If you have a different requirement, maybe you can describe it in more detail.


GCentral
0 Kudos
Message 10 of 12
(2,769 Views)