My Batch file operation is,
Code =
1) Read process date & time and current date & time,
2) compare process login-date & time with current-Date & time
3) If difference is greater than 4hrs
4) terminate the process called "EXCEL.EXE"
4.1) make the entry of process termination in ClientLog.txt = which is OK, happening correctly
4.2) also write an warning message in Warning.txt & display that warning message on user screen = which is NOT WORKING, on termination of process the message txt file is getting generated but not opening/displaying on user machine(same is working OK - if i execute the batch file manually)
But here on client machines, I have scheduled this batch file to run at every 4hours using command as [for /L %h in (0,4,20) do AT \\Remote_PC_hostname %h:00 /EVERY:m,t,w,th,f,s,su "C:\PC\ClientBatchFile-Ver4.bat"],
all the operation is perfect as desired, only the Line no-5 is not functioning correctly,
pls help,
-------------------------------
set boool=0
IF %LOGGDATE% LSS %CDATE% set /a boool=%boool%+1
IF %TTDiff% GEQ 400 set /a boool=%boool%+1
if %boool% GEQ 1 (
taskkill /F /IM EXCEL.EXE
echo %date% l %time% l %computername% l Client Server Communication Terminated >> ClientLog.txt
echo Your AspenPlus Client-Server communication is terminated, beacause it was active for more than 4 hrs. Please Save your pending work before running the simulation>>Warning.txt
start Warning.txt
) else (
echo Application is not opened for more than 4 hrs
)
GOTO End
:End
echo all d things are OK enjoy working on application sw
pause
-----------------------------------------
Thanks in advance,