Batch file to download and run an update, and then email back confirmation

I've set up a scheduled task to run the follow in a .bat file. It's working beautifully, but now I want it to send me an email containing the install log file. Here's what I have:

bitsadmin.exe /transfer "Update NXT Beta" /download 1 c:\setup.exe

START C:\setup.exe /autoupdate

setup.exe then exports a log file into its root directory. I want to grab that and email it to myself if I can. Any help is appreciated.

-------------Problems Reply------------

Use Blat.

This example would send an email to [email protected] (from the same address) using an trusted/relay enabled connection to the local mail server:

Blat C:\LogFile.txt -to [email protected] -i [email protected] -subject "Install Completed on %ComputerName%" -server localhost

Category:windows Views:100 Time:2017-10-22

Related post

Copyright (C), All Rights Reserved.

processed in 0.173 (s). 11 q(s)