delphi 为 Service Application 添加描述文本的方法


本文整理自网络,侵删。

  procedure ServiceUpdateDescription(const ServiceName, Description: string);
var
reg: TRegistry;
begin
reg := TRegistry.Create;
try
with reg do begin
RootKey := HKEY_LOCAL_MACHINE;
if OpenKey('SYSTEM\CurrentControlSet\Services\' + ServiceName, False) then
begin
WriteString('Description', Description);
end;
CloseKey;
end;
finally
reg.Free;
end;
end;

相关阅读 >>

Delphi 按字母排序的windows窗口公用消息

Delphi中initialization和finalization

Delphi cxgrid 通过字段名取得列

Delphi repeat 递增/递减输出

Delphi线程的创建、挂起、激活与终止

Delphi 如何解析网址?

Delphi实现ping功能的类

Delphi 外壳扩展创建快捷方式和获取快捷方式的目标对象

Delphi 调用sql和mysql存储过程

Delphi 非主窗体(即子窗体)在任务栏显示按钮

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...

    正在狠努力加载,请稍候...