Home > Net >  WindowsService problems?
WindowsService problems?

Time:09-26

Finish development windowService, through InstallUtil. Exe to them on the Windows, and normal operation,

WindowService next time of code changes, to regenerate the DLL. This time I just stopped windowService service, then cover off the original DLLS, and restart the windowService, ok?

CodePudding user response:

The theory is ok..

But to stop there will be other questions.. I adopt the way of unloading.

At the time of installation and the uninstall when there is a bat structure about this.




Install

 
@ ECHO OFF
The echo is ready to install service
Pause
REM The following directory is for The.net 4.0
The set DOTNETFX2=%SystemRoot%\Microsoft.NET \ Framework \ v4.0.30319
Set the PATH=% % PATH; DOTNETFX2 % %
Echo installation services...
Echo -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
InstallUtil/I WindowsService1. Exe
Echo -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Echo installation services success!
Pause



Uninstall
 
@ echo unloading service
SystemRoot%\Microsoft.NET \ Framework \ v4.0.30319 \ % installutil WindowsService1. Exe/u
Pause

CodePudding user response:

In fact, you only need to make sure that the file is not exclusive, you can copy file cover can

No matter you are disabled, or unloading, is this purpose,

So under a purpose, regardless of the outage, or uninstall, it is to ensure that documents do not take up (on Windows update file has been a painful thing, CEF until now didn't offer don't shunt down CEF will not be able to clear the cache, because the file takes up hate)

So stop, and uninstall -- -- -- -- -- -- -- things need enough to even, such as a service, you itself is enabled again another background exe with directory, then the exe do you also want to ensure he can also shut down, or remains "file is occupied by a certain process"

CodePudding user response:

I am using the method of unloading to progr

CodePudding user response:

Outage, covers, as long as you guarantee file without being used is ok need to be replaced

CodePudding user response:

Can update less outage coverage, large amount of update uninstall reshipment,

CodePudding user response:

Restart, disable coverage,
  • Related