@ECHO OFF :: This command file is provided free of charge with no support or warranty "As Is" :: The command file will post the last PowerChute event to the desktop :: The assumtion is PowerChute has been installed to the default folder copy c:"\program files\APC\PowerChute\group1\EventLog.txt" c:\temp\Error.txt :: This section reads Error.txt and save the info to a variable setlocal enabledelayedexpansion for /f "tokens=*" %%a in (c:\temp\Error.txt) do ( set temp=%%a ) :: This line post the last PowerChute event to the desktop via msg.exe @START msg.exe * /time 30 !temp!