LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ipconfig does't work

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.

0 Kudos
Message 1 of 11
(3,925 Views)

On the troubled machine can you execute ipconfig and getmac from the Run command in the Start Menu?

0 Kudos
Message 2 of 11
(3,915 Views)

Here is code that you can use to grab the IP addresses from the registry.

 

Get IP Address.png



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 11
(3,911 Views)

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.

 

0 Kudos
Message 4 of 11
(3,904 Views)

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

0 Kudos
Message 5 of 11
(3,901 Views)

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)

0 Kudos
Message 6 of 11
(3,897 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 11
(3,896 Views)

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



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 11
(3,895 Views)

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).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 9 of 11
(3,868 Views)

Hi, Rolf,

 

I don't parse anything after I got the ipconfig/all result. So that should not be a problem in this case.

 

 

0 Kudos
Message 10 of 11
(3,827 Views)