07-09-2008 03:07 PM
07-09-2008 04:22 PM
07-10-2008 10:02 AM
07-10-2008 10:16 AM
Thanks smercurio_fc, it's working now. Need to modify the program a little bit after google "the netsh interface ip set address".
07-10-2008 10:23 AM
05-06-2020 01:12 PM
Hi Guys,
I wanted to add this little snippet here for future LV guys in case it comes in handy.
Now, this is essentially the beginnings of a trojan horse, so remember to always stay on the light side of the force.
Thanks to this guy: https://forums.ni.com/t5/user/viewprofilepage/user-id/260910?profile.language=en
For submitting the snippet to index adapters: https://forums.ni.com/t5/user/viewprofilepage/user-id/260910?profile.language=en
Here was the problem that I needed to automate:
I'm using ethernet connected devices such as air cylinders, DAQs and Stepper motors. I manually set the devices to connect on a specific subdomain - in this case "33"
So IP Stepper: 192.168.33.4, IP Aircylinder Controller: 192.168.33.7 and so on.
I needed to complete two operations - set the adapter IP within that subdomain, and disable TCPIPv6.
The first was fairly easy - "netsh interface ip set"
The second one, changing the IPV6 setting, was difficult.
First off, you cant do this on a per adapter basis from CMD - you must use powershell.
Secondly, you have to pass cmd commands to powershell.
Third, you actually have to pass CMD commands to an escalated powershell launched from within the first powershell [Weird eh?]
Anyhow, got it to work. Happy Coding my friends!
Background: [Writing a "Simple Motion Control" program that allows the quick creation of sequences using multiple devices/motion profiles]