Checking for a file on remote computers via Batch file
<p>So I have set up an MSI software installation to happen on startup, however, i have noticed certain machines for whatever reason are not installing the package. I followed Microsoft's setup on the MSI install so everything in theory should be fine. </p>

<p>What I want to do is check to see if a specific file is located on a machine or not. I have created a txt file with all of the machines IP addresses and i have tried a for each loop to run through the IP's in the text file and if it exists to output to a log file. </p>

<p>The problem I am running into however, is that all are returning as if the file does not exist and echoing out the else command into my log file. I know for a fact the majority of these IP's (computers) have the file in the directory I specified. </p>

<p>Edit:   now it gets stuck if that IP isn't there (I.E. the computer is turned off). Is there anyway to check for that?</p>

<pre class="lang-dos prettyprint-override"><code>ECHO ON
for /F %%a in (ips.txt) do (
    set host=%%a 
    if exist \\%host%\c$\ProgramData\dvsAnalytics\Encore\Config\Encore.ScreenRecording.ClientService.exe.config (
    rem file exists
    ECHO %%a&gt;&gt;"C:\some location\encore-install-success.log"
    ) else (
    rem file does not exist
    ECHO %%a&gt;&gt;"C:\some location\encore-install-fail.log"
    )

)
pause
</code></pre>