c# - How to allow the service to install without prompting for the User ID, Password, Confirm Password -
when try install service (installutil service.exe) visual studio command prompt, prompts set user id, password install service. can refer screenshot(link) of credential prompt.
picture of prompting credentials while installing service.
this done in c#.net .net 4.0 framework.
i have searched prior posting question , end-up setting credentials null (please refer code pasted below). didn't work.
private void initializecomponent() { this.stockmanagementprocessinstaller1 = new system.serviceprocess.serviceprocessinstaller(); this.stockmanagementinstaller1 = new system.serviceprocess.serviceinstaller(); // // stockmanagementprocessinstaller1 // this.stockmanagementprocessinstaller1.password = null; this.stockmanagementprocessinstaller1.username = null; // // stockmanagementinstaller1 // this.stockmanagementinstaller1.displayname = "stockmanagement"; this.stockmanagementinstaller1.servicename = "stockmanagement"; this.stockmanagementinstaller1.starttype = system.serviceprocess.servicestartmode.automatic; // // projectinstaller // this.installers.addrange(new system.configuration.install.installer[] { this.stockmanagementprocessinstaller1, this.stockmanagementinstaller1}); } can me how rid of , install service without problem?
install service local service without password prompt , following:
// stockmanagementprocessinstaller1 // this.stockmanagementprocessinstaller1.account = serviceaccount.localservice; this.stockmanagementprocessinstaller1.password = null; this.stockmanagementprocessinstaller1.username = null; instead of:
// stockmanagementprocessinstaller1 // this.stockmanagementprocessinstaller1.password = null; this.stockmanagementprocessinstaller1.username = null; i hope support question.
Comments
Post a Comment