Script to auto schedule the Memory diagnostics tool
Posted: Wed Sep 03, 2014 5:48 pm
Today I had a message from a tech asking if there was any way to use UVK to startup or schedule the Windows Memory Diagnostic program to run on next boot without popping up anything on the screen that the end user would see.
I thought that was an interesting idea, but couldn't find anything in the registry or in the web that could help me to find out how windows performs the schedule.
So I came up with a script that does the job. Actually two scripts. One just performs the schedule, the other one also reboots immediately.
mdsched.uvk : Schedule the Memory Diagnostic scan for the next boot:
mdsched2.uvk : Schedule the Memory Diagnostic scan and reboot immediately:
As you can see from the code, the scripts do exactly what we do manually to schedule the Memory diagnostics, but the clicks are so fast that nobody can really see what's going on.
Hope you guys find the scripts useful.
I thought that was an interesting idea, but couldn't find anything in the registry or in the web that could help me to find out how windows performs the schedule.
So I came up with a script that does the job. Actually two scripts. One just performs the schedule, the other one also reboots immediately.
mdsched.uvk : Schedule the Memory Diagnostic scan for the next boot:
Code: Select all
<Run>
%SystemDir%\MdSched.exe
<Comment>
->WaitWindow(10)
->WaitControl([CLASS:Button; INSTANCE:2],5)
->ClickControl([CLASS:Button; INSTANCE:2])
->WaitWindowClose()
->WaitWindow(2)
->WaitControl([CLASS:Button; INSTANCE:1],2)
->ClickControl([CLASS:Button; INSTANCE:1])
Code: Select all
<Run>
%SystemDir%\MdSched.exe
->WaitWindow(10)
->WaitControl([CLASS:Button; INSTANCE:1],5)
->ClickControl([CLASS:Button; INSTANCE:1])
->WaitWindowClose()
->WaitWindow(2)
->WaitControl([CLASS:Button; INSTANCE:1],2)
->ClickControl([CLASS:Button; INSTANCE:1])
Hope you guys find the scripts useful.