Well i figure that if i do a temp. batch file for a small project heres the batch script.
IPAddy would = a number xx.xx also how to execute from a button and run as admin at the same time.

@echo off
netsh interface ipv4 set address "local Area Connection" static 10.IPAddy.2
imports system.io

try this
call the sub on a button, and input your ipaddress to pass to the function.
after the file runs you will need to delete the file
if you delete it to early it will not complete running.

and your command is incorrect..

Private Sub CRDBat(ByVal IPAddy As String)

        'Create/Runs/Deletes A Batch File For NETSH

        Dim StreamWriter As StreamWriter
        StreamWriter = File.CreateText("C:\ThisIsYourBatch.bat")
        StreamWriter.WriteLine("@echo off")
        StreamWriter.WriteLine("netsh interface ipv4 set address" & Chr(34) & "Local Area Connection" & Chr(34) & "static 10." & IPAddy & ".2")
        StreamWriter.WriteLine("pause")
        StreamWriter.Close()
        Shell("C:\ThisIsYourBatch.bat")

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        CRDBat("10.4")

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        File.Delete("C:\ThisIsYourBatch.bat")

    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.