Have you tried to use just new DefaultShell("Restart Application") ? 

It should wait for shell by default, thus you don't need to call WaitUntil