(imported topic written by SystemAdmin)
I’m looking to create a task that will stop all SQL instance services. I know this is not correct, but here is the action script I have come up with so far. Help would be greatly appreciated…
delete __appendfile
appendfile @echo off
appendfile echo Your administrator is stopping All SQL Instances…
appendfile net stop {concatenation of (service name of it & " & net stop ") of services whose (exists file (first match (case insensitive regex "
^%22
*sqlservr.exe") of (image path of it)))}
delete sqlStop.bat
copy __appendfile sqlStop.bat
run sqlStop.bat
Andrew