|
OK, so. First time posting in SH/SC in a long time, didn't see any suggested posting format in the rules. Here's the system: A Windows 8.1 system, with Windows Defender as my virus scan of choice (and also employer mandate for my work-from-home job so it works out that way). Running a full scan on my system takes 2-3 hours to complete, therefore I would like to start it when I go to bed (IE, upon user trigger at whatever point in time) once a week. At the completion of the scan, I would like the system to shut down without action from the user (as the user will be asleep, hopefully). I see no obvious way to do this in Windows Defender, and getting another virus scan program is neither desired by me nor even allowed by my employer. So how do I do this? Ideally, this would be a batch file or something I could place on the desktop and click when I want it to execute, but if it's slightly more complicated I won't complain, personally.
|
# ? Jun 3, 2018 17:23 |
|
|
# ? May 6, 2024 18:47 |
|
Does Defender put anything into the event log when a scan completes?
|
# ? Jun 3, 2018 17:37 |
|
Serious question, has it ever caught anything on your system?
|
# ? Jun 3, 2018 18:00 |
|
redeyes posted:Serious question, has it ever caught anything on your system? If it's mandated by his employer then that hardly matters tbf
|
# ? Jun 3, 2018 18:30 |
|
feedmegin posted:If it's mandated by his employer then that hardly matters tbf Precisely, feedmegin. It hasn't (then again neither have other virus scanners I've used), but that isn't relevant. Thanks Ants posted:Does Defender put anything into the event log when a scan completes? I find that, in the log, event 1001 from Windows Defender tells me when a scan of any sort completes, but it doesn't distinguish between a quick scan and a full scan. So that is not useful, I would think?
|
# ? Jun 3, 2018 20:34 |
|
I've never used windows defender on Windows 8.1 so I can't say for sure how accurate this is but you should be able to set a schedule for your full scan. See here: https://support.microsoft.com/en-us/help/4026132/windows-10-schedule-a-scan-in-windows-defender-antivirus . Once you've done that, you can just make a scheduled task that runs on the schedule of your choosing and shuts down the PC. Is this your personally owned PC or one your employer has issued you? What is your employer using to monitor compliance with their policies?
|
# ? Jun 4, 2018 18:34 |
|
Do it in a batch script:code:
|
# ? Jun 4, 2018 18:47 |
|
Mr. Clark2 posted:I've never used windows defender on Windows 8.1 so I can't say for sure how accurate this is but you should be able to set a schedule for your full scan. See here: https://support.microsoft.com/en-us/help/4026132/windows-10-schedule-a-scan-in-windows-defender-antivirus . Once you've done that, you can just make a scheduled task that runs on the schedule of your choosing and shuts down the PC. Personal, employer's software has to see a full scan completed once every so many days (among other precautions) or it won't run. BangersInMyKnickers posted:Do it in a batch script: Awesome. Just so I'm clear, what do the switches on shutdown do?
|
# ? Jun 5, 2018 02:39 |
|
code:
|
# ? Jun 5, 2018 04:18 |
|
~Coxy, thank you so very much. I shall set up the batch file this evening (hopefully I remember how to do it properly, been literally decades since I had to) and tell how it goes.
|
# ? Jun 5, 2018 11:43 |
|
Spacewolf posted:~Coxy, thank you so very much. Copy/paste the above lines into notepad and save as blah.bat (choose a name to your liking). Create scheduled task that runs blah.bat on schedule of your choosing or run it manually by double clicking it whenever you want.
|
# ? Jun 5, 2018 22:16 |
|
Yup. I test the batch file in 15 minutes. Here goes nothin.
|
# ? Jun 6, 2018 03:48 |
|
So, copy pasted ~Coxy's lines into a batch file, named it scanandshutdown.bat. Ran it last night. It shut down the computer, but did not start a scan. Created MPCmdRun.exe as a file on the desktop, a file which clicking on on its own reveals it does not work with my version of windows. (8.1) I am now confused and saddened. This is simple, right? I'm missing something obvious, I hope....
|
# ? Jun 7, 2018 12:51 |
|
"C:\Program Files\Windows Defender\MpCmdRun.exe" /scan /scantype 2 Make the first line look like that. I was copying output from my console; you won't be in that Window Defender directory by default so the path needs to be explicitly stated.
|
# ? Jun 7, 2018 15:00 |
|
BangersInMyKnickers posted:"C:\Program Files\Windows Defender\MpCmdRun.exe" /scan /scantype 2 Ahhhh. Okay. I am learning, slowly but surely. I thought I already knew, but guess not!
|
# ? Jun 7, 2018 15:04 |
|
This is what scanandshutdown.bat looks like now:code:
|
# ? Jun 10, 2018 12:38 |
|
|
# ? May 6, 2024 18:47 |
|
Spacewolf posted:This is what scanandshutdown.bat looks like now: And I just realized my typo. At what point do I get forced to wear a dunce cap? Upon correcting the typo, the file works as advertised.
|
# ? Jun 10, 2018 12:40 |