Solution

https://github.com/steverezhener/DBA/blob/master/Procedures/bestpractices.usp_change_auto_shrink.sql