简体   繁体   中英

Exe files run by Windows service remain in Task Manager and are not removed

I have a Windows service that is basically a job scheduler. When a job is supposed to be triggered it reads some parameters from an Sql Server database and runs an exe file.

In order for the service to read from the database I have to change my service properties to log on as another account who has access to the database. So I have to change my local account to an account eg john.smith@myserver.com with password=123

Things seem to be working fine, except when I leave the computer at night and a job is supposed to be run eg every hour. The morning after when I log on, I see that the jobs are successfully triggered but for each run of the job there is a new instance of the exe file in my processes. And I have to close all those instances. This obviously is not my desired behavior.

Does anything change when windows is in Locked mode? And either way, why the new instances of the program remain in task manager . Not to mention, the exe files are automatically closed whether they do their job correctly or not.

If you run the EXE from the command line, does it require any kind of keyboard input? Is it asking for parameters? Does it say something like "Press any key to exit"?

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