Windows trying to run maintenance.vbs on startup
Every time I boot Windows, I get an empty command-line window (at c:\Windows\system32) and an error in a "Windows Script Host" pop-up. It says "Cannot find script file "C:\Windows\system32\Maintenance.vbs". The command line used to close automatically but I edited my registry to stop that so I could investigate what was happening. Now I have to manually run explorer from the command-line to finish starting windows.
I looked for maintenance.vbs in file explorer, the registry, and startup items. Nothing. I want to find what is attempting to run this script and stop it. Please help. Thanks
Posted Oct 4, 2019, 5:25 PM UTC
Probably in the registry, but it could be something else trying to load it. Run a malware scan first to be sure you're clean, and if it's infection-related then it'll probably take care of it: https://www.reddit.com/r/techsupport/comments/33evdi/suggested_reading_official_malware_removal_guide/
If not, when you search the registry, make sure you don't check "Match whole string only". Only search for "Maintenance.vbs". It will probably take a very long time to search. You can narrow it down to the Software/Microsoft/Windows [NT] keys to start instead of searching the whole thing.
Also check Task Scheduler. There could be something in there.
Also found this: https://answers.microsoft.com/en-us/windows/forum/windows_10-performance/maintenancevbs-windows-script-host-error/9f380a60-333b-4276-bc96-53137dd82ae1
Thanks! I was all but ready to give up after following your instructions and getting to the searching of task scheduler. The Microsoft\Windows folder has a ton of subfolders! But one was named Maintenance, and, in there, there's an InstallWinSAT task that runs maintenance.vbs when anyone logs in. Disabling this made my computer boot perfectly again.
I see that WinSAT is a legit Windows tool so I won't touch the other, legit-looking task that's in this folder. Is it safe to delete the InstallWinSAT task?
You could probably just delete the value, at least the part that has maintenance.vbs In task Scheduler, you can delete a task but it might get added back by MS.
True. Ok I'll do that