title: Use NetConnectionID name to populate selection list in batch
body: <p>I have written a simple Batch file to manage the IP addresses of the Various NICs on my PCs. Currently though it needs to have the names of the NICs written into the batch file so they can be selected:</p>
  
  <pre><code>ECHO  Select Network Interface                          
  ECHO.                                                             
  ECHO   1 - WiFi                                 
  ECHO   2 - LAN 1                                    
  ECHO   3 - LAN 2                                            
  ECHO   9 - Exit                                                   
  SET "A="
  SET /P A=Set Your Choice And Press Enter: 
  IF "%A%"=="1" set net_int=WiFi
  IF "%A%"=="2" set net_int=LAN 1
  IF "%A%"=="3" set net_int=LAN 2
  IF "%A%"=="9" EXIT
  echo %net_int% selected
  </code></pre>
  
  <p>I have found the following snippet to list the network connections available on a PC:</p>
  
  <pre><code>@Echo Off
  Set "i=0"
  For /F "Skip=1Delims=" %%A In (
  'WMIC NIC  Get NetConnectionID'
  ) Do For /F "Delims=" %%B In ("%%A") Do Call :Sub %%B
  Set NIC[
  Timeout -1
  Exit/B
  :Sub
  Set/A i+=1
  Set "NIC[%i%]=%*"
  </code></pre>
  
  <p>Is it possible to use something like this to 'populate' the Select Network Interface list in my Batch file, with the number of entries in the list matching the number of NICs available? I wish to use this on several machines, without having to edit the Batch to reflect the names and number of NICs on each machine.</p>