title: Adding variables from a text file to be used in URL path in batch file
body: <p>I read several threads on similar issues but so far unable to find specific solution. I need to execute a batch file on a number of computers to repair a corrupted management agent. Because the agent is corrupted I cannot use the management system to resolve the issue and I have a tested solution that uses <code>WMIC</code>.</p>
  
  <p>I have a text file containing a list of computer names, is it possible to <strong>pull the computer names from the text file and use in the below batch file</strong>?</p>
  
  <pre><code>@echo off
  
  set compname=%computername%
  
  IF EXIST "\\%compname%\C$\Install\" GOTO CopyFile
  
  mkdir "\\%compname%\C$\Install\"
  
  :CopyFile
  
  copy "\\shareserver\sharefolder\AgentRepair.cmd" "\\%compname%\C$\Install\"
  
  wmic /NODE:%compname% /USER:domain\username /PASSWORD:password process call create "c:\Install\AgentRepair.cmd" 
  
  exit
  </code></pre>