Question : run the code at startup

Hi Guys

Below is a code which is suppose to run an exe file from anetwork drives and save log file at shared folder in my network drive . I will execute this code on my 30 computer from a policy at everyday computer starts , and save their log file . but i have an issue

This is an exe file which needs two button to be clicked and then press button to finish this file , which this code deos not not handle . this Exe is a microsoft malicious removal Tool , which needs to clean the system .
=================================================================================
REM In this example, the script is named RunMRT.cmd.
REM The Sleep.exe utility is used to delay the execution of the tool when used as a
REM startup script. See the "Known issues" section for details.
@echo off

Start /wait \\ServerName\ShareName\Windows-KB890830-V2.4.exe /q

copy %windir%\debug\mrt.log \\ServerName\ShareName\Logs\%computername%_%username%_mrt.log
=====================================================================================

which code can handle the execution of this tool in silent mode .


Looking forward experts to have a look on it and provide me with sol

Answer : run the code at startup

If you use the  find /c /i "Infected Files" Drive:\directory\log.txt cmd in the batch script, it will output the below example:

---------- Drive:\Directory\log.txt: (Number of reports hits for the word "Infected files".

This will indicate to you how many file have been infected.

This is the script you'll need. You may need to change it to get it to run the way you like it but it's all setup ready to go. If this doesn't work for you, I'd honestly suggest reading through the Help and Support section of DOS commands in Windows as this will give you a great deal of knowledge in how to script.
1:
2:
3:
4:
5:
6:
7:
Start /wait \\ServerName\ShareName\Windows-KB890830-V2.5.exe /q
 
for /f "tokens=3" %%i in ('find /c /i "Infected Files" %windir%\debug\mrt.log') do set INFECTTEST= %%i
 
echo %COMPUTERNAME%,%USERNAME%, %INFECTTEST% >> Results.csv 
 
copy %windir%\debug\mrt.log \\ServerName\ShareName\Logs\%computername%_%username%_mrt.log
Open in New Window Select All
Random Solutions  
 
programming4us programming4us