Fixed almost everything needed to install as a service.
Missing: Service host if not user interactive.