@ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION FOR /F %%A IN ('net view ^| findstr \\PC') DO ( ECHO %%A SET Destination=%%A\c$\Temp\PortRptr IF NOT EXIST "!Destination!" MD "!Destination!" COPY ".\PortRptr" "!Destination!" PSEXEC %%A C:\Temp\PortRptr\pr-setup.exe /a /s IF !errorlevel! NEQ 0 (ECHO %%A FAILED>>%~n0.log) ELSE (ECHO %%A SUCCESS>>%~n0.log) RD /S /Q "!Destination!" ) PAUSE
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.