This might work but I am using a shell
so the app is stopping at the shell and not processing any maximize code.

Is there a way to force the application to continue in the background?