I agree, it is a complex solution, but each to their own
I restore a db each day using a similar trick, again using VB Script, probably because that's where my background is from. Today (!) a workmate asked me how to do something simliar in T-SQL, and I was able to pass along your code as a good example. Thanks
I'll have to write up the VB Script referred to above (runs on a File Print Server with no SQL installed) as my next article.
Dave J