Hi @ Wilders I wonder if anyone has attempted to do what I am trying to do as per the Title of this thread. I got the idea from a post and tutorial from the Malwarebytes forum (Using Emsisoft Emergency Kit). I am nearly there but there is one problem that the tutorial does not cover so I am asking for help herte:- WHAT I DID (Courtesy extracts from Malwarebytes Forum) 1) Create 3 text files (*.txt) --> edit them: a) Type "C:\EEK\bin64\a2cmd.exe" /u -- -----> save as Update.bat ( inside EEK folder) b) Type:"C:\EEK\bin64\a2cmd.exe" /malware /log="C:\EEK\Logs\Malwarescan_log_%time:~0,2%h%time:~3,2%m_%date:~-7,2%_%date:~-10,2%_%date:~-4,4%.log" /quarantine="C:\EEK\Quarantine" ----> save as Malware_Scan.bat Open Windows "Task Scheduler" Create 2 tasks, one for each scan. Each one will contain 2 bat files: update.bat and the Malware_Scan.bat. Click on "create basic task", name it "EEK Malware Scan", followed the instructions and chose when I wanted run the scan. When asked which action to perform, chose "Start a program" and selected the update.bat With both tasks created: 1) right click "EEK Malware_Scan", and check "Run with highest privileges". 2) Select the Actions Tab, click "New", Start a program and select the "Malware_Scan.bat" 4) Save the edits Done. This runs the scheduled task as configured, update EEK, run the scan, quarantine any problem it finds, save a log file inside C:\EEK\Logs; and Quarantine in C:\EEK\Quarantine if necessary. THE PROBLEM This method works. The problem is whilst it is running the CMD black window remains open and I would like it to be hidden, but I don't know how to do it. It has been suggested that instead of ticking Run when user is not logged on, tick “Run whether user is logged on or not” option and this will hide the CMD window. For me this did not work and was hoping someone would have a simple solution? Thank you Terry
Terry, Add these 2 lines to the top of your batch file. It should be hidden when it runs... Code: @echo off if not defined RunTask set RunTask=1 & start "hidden" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
same thought here, it need CMD to perform hidden or minimized but for the task planer i think the CMD is the executable and the params and batch are the arguments.
Hi Brian K Well it was worth the effort me putting the rather large post this morning. Your suggestion works a treat. It drops the open CMD window to the task bar. An excellent job. Thank you so much Terry
I first saw the code in this TeraByte Unlimited page... https://www.terabyteunlimited.com/k...age-for-windows-backups-using-task-scheduler/
Terry, Out of interest, can you try this? Delete the code line I posted and add start "" at the front of your line. Such as... Code: start "" "C:\EEK\bin64\a2cmd.exe" /malware /log="C:\EEK\Logs\Malwarescan_log_%time:~0,2%h%time:~3,2%m_%date:~-7,2%_%date:~-10,2%_%date:~-4,4%.log" /quarantine="C:\EEK\Quarantine" Does that work?
You can prevent a batch file line from running by preceding the line with... :: For example... Code: ::if not defined RunTask set RunTask=1 & start "hidden" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
Hi Brian K Sorry for the late reply only just seen your post, In a nutshell Start"" space, and the rest does nothing. The task runs, updates and scans, BUT the CMD windows remain open, not hidden as in your first posts suggestion. Terry
Thanks for trying it. Maybe the file extension should be .cmd rather than .bat but I'm just guessing. Edit, it is start "" not start""
Hi Brian I'd revisited it after seeing there was a space between start and two sets of inverted commas and I have just finished it. Still no joy I am afraid. I have restored it to your original post and it works as it did first time round. Sorry. Thanks for all your efforts on my behalf One thing you might be able to comment on in respect of Emsisoft EEK is the updating of signatures and program. I am using:- if not defined RunTask set RunTask=1 & start "hidden" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF "C:\EEK\bin64\a2cmd.exe" /u This is when I use the Command Line scanner not the scanner via the GUI This is wrapped in a .bat file (Named Update) and it is activated by the Win 11 Task Scheduler. EEK is a dual Engine scanner i.e. BitDefender and Emsisoft In House signatures. I mention this because when I update there is clear evidence of downloading of BitDefender signatures BUT NO EVIDENCE of downloading of Emsisoft signatures. The update code is correct as above. What I don't know for certain is whether the Command line scanner only uses Bit Defender signatures. Looking at the logs for the GUI scanner the signatures are well out of date so if the Command Line scanner does update the signatures it certainly should do if there is commonality with the GUI signatures because they are out of date. I contacted Emsisoft support and I have not had a reply from them and I sense "coyness" possibly unfairly on my part. I like Emsisoft very much, but it's no good if it needs signatures for BitDefender & Emsisoft but only updates only one half of the package. I emphasize again this is about using the command line scanner through the task manager using .bat scripts. Are you able to make any observations? Thank you for your expertise Terry