Does anyone know how to make service application in Delphi which install it self by running exe file.
A Delphi service, created using the TService
class, results in an executable that supports self-registration. Call it like this:
serviceexefilename.exe /install
Naturally you need elevated rights for this to work, just as you do for any mechanism that installs a service.
In the other direction use /uninstall
to reverse the process. Use /silent
to make the registration process, well, silent.
Should you wish to customise the installation process you can provide event handlers BeforeInstall
, AfterInstall
, BeforeUninstall
, AfterUninstall
. For example, a common use of AfterInstall
is to supply a description for your service since the basic TService
code does not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With