简体   繁体   中英

Can't find windows service in service lists

I installed a Windows Service under an account type user in service installer. When I try to start it from service lists I can't find it. If I change the account type to local service in the installer then I can find it. I need to built it under a user account. How to solve this?

save this text to a batch file(.bat) and run in the sample folder with your window service

@ECHO OFF
ECHO -----------------------------------------------------------------------------------------
ECHO ------------------------------ Auto Install Windows Service -----------------------------
ECHO -----------------------------------------------------------------------------------------
ECHO --- Typing the path of Windows Service need to install
@SET /p serviceName=
IF NOT "%serviceName%" == "" (
    ECHO --- Installing "%serviceName%"
    ECHO -------------------------------------------------------------------------------------
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil %serviceName% -i
    net start yourservicename
    ECHO -------------------------------------------------------------------------------------
    PAUSE
)

Sometimes this happen when you install the service and the List Service Window is open. just install the service with the service windows close, sound silly but it works.

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