01-17-2013 05:20 PM
Hi, guys. First, I don't think this question is a perfect fit in this forum, but I can't find any answer anywhere else. So, excuse me for that.
I made a .exe file to acquire customers' MAC address using Labview 6.1. What I did was I used a System Excec.vi and gave it command line ipconfig/all. Then I save the acquired data locally as a .stp file.
It worked good all the time. Today I ran it to 3 of my customers' computers, 2 of them were correct, and one of them didn't get anything.
It's the first time it happens to me, and I've no idea what's going on.
Any suggestion and hint will be appreciated!!
Thanks in advance.
01-17-2013 05:34 PM
On the troubled machine can you execute ipconfig and getmac from the Run command in the Start Menu?
01-17-2013 05:38 PM
Here is code that you can use to grab the IP addresses from the registry.
01-17-2013 05:44 PM
Hi, Darin,
I'm not sure. The problem is, I don't have the troubled computer with me and since it's for customer, I can't have him trouble shooting with me.....
Even though it will be a lot easier if I can.
01-17-2013 05:47 PM
Hi, Mark,
Do you have .vi file that you can share?
I don't understand the code, and I can't find the function you used in the code. I'm not sure if Labview 6.1 has it.
Thanks
01-17-2013 05:58 PM
Note to Mark: 0.0.0.0 may not behave quite as expected as a regex. Probably ok for this case, but I would suggest escaping the dots.
(No regex in v6.1 at any rate, do not know about the registry VIs)
01-17-2013 06:08 PM
I don't have it in a LabVIEW 6.1 version and I don't have an old enough version to save it for 6.1 either. Also, the code I posted above gets the IP Address, not the MAC address.
01-17-2013 06:09 PM
@Darin.K wrote:
Note to Mark: 0.0.0.0 may not behave quite as expected as a regex. Probably ok for this case, but I would suggest escaping the dots.
(No regex in v6.1 at any rate, do not know about the registry VIs)
True, in this case it will work though since everything being searched are only IP Addresses. But your point is good advice.
01-18-2013 08:10 AM
The problem with trying to parse the result from ipconfig is most likely that Microsoft likes to localize the Windows versions down to command line tools. So if you are not VERY careful, your parsing routines will only work on the same language version of Windows (and possibly Windows version) as you developed it on).
01-20-2013 10:53 PM
Hi, Rolf,
I don't parse anything after I got the ipconfig/all result. So that should not be a problem in this case.