Delphi安装NT服务程序时(不出现提示信息)

如果我们不加上"/silent",那么Delphi在安装和卸载NT服务程序时候,都会出现一个提示信息,不希望出现这个提示信息,那么使用如下命令:

1,安装:“你的nt程序 /install /silent”。

2,卸载:“你的nt程序 /uninstall /silent”。

这是Delphi中注册服务方法声明,Silent是决定是否提示的参数:

procedure TServiceApplication.RegisterServices(Install, Silent: Boolean); 

下面是具体出现提示的代码:

   if Success and not Silent then
      if Install then
        DisplayMessage(SServiceInstallOK, mtInformation)
      else
        DisplayMessage(SServiceUninstallOK, mtInformation);

看到这些,我想大家就知道为什么不加那个"/silent"参数会出现提示了!

http://blog.csdn.net/sunylat/article/details/8847730

原文地址:https://www.cnblogs.com/findumars/p/5236988.html