I created a Windows service and an installer for it. Now I want to run the windows service under account say na\test.\
I am specifieng it in Projectinstaller.
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.User;
this.serviceProcessInstaller1.Password = "pass123"
this.serviceProcessInstaller1.Username = "na\test";
I am installing the above in so many servers.
All the servers might not have the permissions to na\test.
If it doesn't have permissions the installation is getting stopped. Is there anyway that I can catch that exception and if the user doesnt have permissions, restart the installation with local user account automatically.