From Rick Cogley, 2 Years ago, written in WinBatch.
Embed
  1. @echo off
  2. # Author: Rick Cogley
  3. # Last Update: 1 Nov 2014
  4. set myresults=results.txt
  5. echo "== STARTING BATCH =="
  6. echo "Results from %computername%:" > %myresults%
  7. echo "Pinging..." >> %myresults%
  8. ping -n 4 www.esolia.com >> %myresults%
  9. echo. >> %myresults%
  10. echo "Running SET..." >> %myresults%
  11. set >> %myresults%
  12. echo. >> %myresults%
  13. echo "PC info..." >> %myresults%
  14. echo "Computer: %computername%" >> %myresults%
  15. echo "Domain: %computerdomain%" >> %myresults%
  16. echo "== ENDING BATCH =="