Try to abandon the use of BAT/CMD files (due to a very limited set of commands), preferring VB or JS scripts. They have a www.abyssmedia.com/scriptcryptor
Still as a variant: there is such a thing as Macro Scheduler Pro
Here it is my script, in my opinion, may be downloaded in. EXE files...
And the latest version, but it is rather complicated, but extremely fancy - it's AutoIt
We can say that it is almost a programming language!
For Windows 7, I think the most reasonable solution is a PowerShell script on the database, especially as it is already
at the system level... you can Do everything that will want and even more!