title: How to detect the network interface is "initialized"
body: <p>My USB network adapter (latest drivers) disappear from "network connections" window in control panel when computer wake up from sleep. So construct batch file to resetting adapter using devcon. After adapter reset I want to add some IP subnets programatically using netsh. Problem is the adapter probably need some time after reset (disable &amp;&amp; enable commands) is performed, because netsh failed if started earlier than some (let say 6 seconds, old Atom CPU is used) time. Now I have inserted timeout using 'timeout /T' command but this time could vary by system load. Question is: Is there any way to detect adapter status programatically from batch file?</p>
  
  <pre><code>set "netcmd=netsh in ip add address ETH1 192.168.0.100 255.255.255.0"
  devcon disable "USB\VID_9710&amp;PID_7830" &gt;NUL 
  devcon enable "USB\VID_9710&amp;PID_7830" &gt;NUL 
  timeout /T 6 &gt;NUL
  %netcmd%
  </code></pre>