set wshshell = CreateObject("Wscript.Shell") prefix = InputBox("Enter first three octets (x.x.x)") first = InputBox("Enter first IP (x)") last = InputBox("Enter Last IP (x)") vbQuote = """" for x=first to last wshshell.run "netsh interface ip add address "& vbQuote &"Local Area Connection"& vbQuote &" " & prefix & "." & x & " " & subnet,0,true next msgbox "Done."