title: Change ip address using vbs on windows 7
body: <p>I have tried using this script to change the ipaddress on windows xp and it works great. </p>
  
  <pre><code>Dim strIPAddress
  Dim strSubnetMask
  Dim strGateway
  Dim intGatewayMetric
  Dim strDns1
  Dim strDns2
  
  strIPAddress = "10.10.10.50"
  strSubnetMask = "255.255.255.0"
  strGateway = "10.10.10.1"
  intGatewayMetric = 1
  strDns1 = "10.10.10.9"
  strDns2 = "10.10.10.10"
  
  Set objShell = WScript.CreateObject("Wscript.Shell")
  objShell.Run "netsh interface ip set address name=""Local Area Connection"" static " &amp; strIPAddress &amp; " " &amp; strSubnetMask &amp; " " &amp; strGateway &amp; " " &amp; intGatewayMetric, 0, True
  objShell.Run "netsh interface ip set dns name=""Local Area Connection"" static "&amp; strDns1, 0, True
  objShell.Run "netsh interface ip add dns name=""Local Area Connection"" addr="&amp; strDns2, 0, True
  Set objShell = Nothing
  WScript.Quit
  </code></pre>
  
  <p>What do i have to change to get it to work with windows 7 please</p>
  
  <p>Thanks
  Chris</p>