|
Answer» i needed a quick an easy way to upload a script to download several AV software and run them mostly without user input. My scripting abilities are amature, but i can usually botch something together and make it work. My script is below i am having an issue on the Line :JRT right after the call for key.vbs i need it to wait until JRT.exe to finish before moving onto anything else. Then once JRT.exe is done move on thru the script automatically. Feel FREE to offer anything to clean this up to work better.
Thanks for your time Neil
echo off echo YOU WILL HAVE TO ALLOW A FEW PROMPTS FOR THE PROGRAM TO RUN pause echo THE PROGRAM MAY APPEAR TO BE DOING NOTHING DO NOT CLOSE IT, IT'S WORKING PAUSE echo IF IT ASKS TO REBOOT ANYWHERE SAY NO pause echo THIS COULD TAKE AROUND 30+ MINUTES TO FINISH pause cd progs start /wait wget http://thisisudax.org/downloads/JRT.exe start /wait wget http://download.bleepingcomputer.com/grinler/rkill.scr start /wait wget http://downloads.malwarebytes.org/file/chameleon/ start /wait wget http://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe start /wait 7za e mbam-chameleon-*.zip
GOTO rkill
:rkill start /wait rkill.scr -s goto JRT
:JRT start JRT.exe call key.vbs Taskkill /F /IM notepad.exe goto tds
:tds start /wait tdsskiller.exe -silent goto mbam
:mbam start firefox.scr ping 192.0.2.2 -n 1 -w 180000 > nul Taskkill /F /IM firefox.scr Taskkill /F /IM mbam-killer.exe cd C:\Program Files\Malwarebytes' Anti-Malware start /wait mbam.exe /quickscan
goto END
:ENDTwo options. See if JRT.exe will respect the /WAIT option with the START command. Don't use the START command when starting JRT.exe. Batch is sequential process. If you just supply the name of the executable to run it will wait for that program to finish running before it moves onto the next command in the batch file.It does respect the /wait option the problem is i have to run a separate WSH SendKey script to make JRT.exe run without user input (it has a press any key to continue). So then i basically need some way of waiting for JRT.exe to finish before moving forward with the script. Like some kind of loop to wait for the process to finish then go forward. Anyone ?if JRT.exe terminates on exit you can use something like
Code: [Select]:l tasklist | find "JRT.exe" || goto :l
or if you don't want the line to show up,
Code: [Select]:l for /f "delims=" %%A in ('tasklist ^| find "JRT.exe"') do goto :l It sounds like it doesn't terminate when it finishes so he is trying to use SendKeys in his vbscript to end the program when it is done. Problem is how would we KNOW when it is really done. I think you would have to MONITOR the cpu usage of the process.
|