''=======================================================
''FOR ANY ISSUES PLEASE CONTACT ANDREI@WEBXPERT.RO
''=======================================================

strIPAddress = inputbox("Set the IP Address", "IP Address?", "192.168.100.100")
strSubnetMask = array(inputbox("Set mask", "Mask?", "255.255.255.0"))

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
		("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strGatewayMetric = Array(1)

For Each objNetAdapter in colNetAdapters

	if objNetAdapter.Description = "Microsoft Loopback Adapter" then
		errEnable = objNetAdapter.EnableStatic(array(strIPAddress), strSubnetMask)
		If errEnable = 0 Then
			WScript.Echo "The IP address has been changed."
		Else
			WScript.Echo "The IP address could not be changed."
		End If
	end if
Next

