Hi guys,
I've got a script here that OdBA created for me a while back which was to execute a .msi file from a shared location on our server to multiple PC's using the Psexec command.
Here it is:
@echo off
setlocal enabledelayedexpansion
set MachineFile=C:\Temp\machines.txt
set LogFile=C:\Temp\machines.csv
>"%LogFile%" echo "Machine","State","Errorlevel"
for /f %%a in ('type "%MachineFile%"') do (
echo Processing %%a ...
ping.exe -4 -n 2 %%~a | find /i "TTL" >NUL
if errorlevel 1 (
>>"%LogFile%" echo "%%~a","Offline","n/a"
) else (
ECHO c:\psexec.exe \\%%~a -u Domain\Username -p Password msiexec.exe /i "\\networkservername\sharename\my.msi" /quiet /norestart
>>"%LogFile%" echo "%%~a","Online","!ErrorLevel!"
)
)
echo Done.
Is there a way to modify this so that it can copy a folder from the server share, to a folder on PC's with different IP's?
Thanks a lot
Yashy
So in terms of the username/password details of the domain, will that still remain?