简体   繁体   中英

C# - Windows Service running under LocalSystem is prompting for credentials when installing using Visual Studio setup project

As the title suggests I am having issues getting rid of the dialog box that pops up to set service login information when installing my service.

I have the service configured as a LocalSystem service, and when I install it using installutil.exe through the developer console it installs without asking for credentials, but when I install it using the setup project in my solution it prompts for the service login.

This is the configuration of my service process installer:

        this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
        this.serviceProcessInstaller1.Password = null;
        this.serviceProcessInstaller1.Username = null;

Does anyone know how to fix this issue?

The issue was the result of the application folder not getting removed from Program Files after uninstalling the application. I hope this will help out anyone else who gets stuck with this same issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM