title: psexec remote computer name
body: <p>I am mostly new to this kind of stuff and running into a problem I don't know how to solve. Basically, it's looking at test.txt and using the list of computer names inside it, and running the batch file on each of them. If I could figure out a way to plug in the remote computer name I would be good to go but I don't know how to do that. I have researched a bit and saw that some people say you can use %COMPUTERNAME^% with the ^ giving it the ability to return the remote computer name rather than the one I'm running the command from. This works if I do something like:</p>
  
  <pre><code>psexec @c:\test.txt cmd /c echo %COMPUTERNAME^%
  </code></pre>
  
  <p>However, if I try to use that in the path of the file I want to run it does not work and just tries to use "%COMPUTERNAME%" as the actual name instead of resolving it. Here is the command I'm trying to use:</p>
  
  <pre><code>psexec @c:\test.txt elevate \\%COMPUTERNAME%\c$\IE10fix.bat
  </code></pre>
  
  <p>I'm trying to run this batch file on a long list of computer names, and it must be run as local administrator which is why I'm using elevate. If anyone can provide a solution to the remote computer name issue, or even another approach all together I would be very thankful.</p>