Iis7AppPool Start throws COMException

I was getting a COMException: The object identifier does not represent a valid object from the Start action of the Iis7AppPool task. Google suggests this might be to do with the Windows Process Activation Service not being ready. I've forked the
source and added the following method to catch the exception, wait 100ms and retry up to 3 times:

Thanks for the fix. What do you think of the following. I've increased the sleep to 1 second and removed the contains check as this won't work on non-english systems. I'm also logging a low importance message