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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -