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;

相关阅读 >>

Delphi10.3读取json数组

Delphi 使用 tedgebrowser 组件

Delphi treeview节点展开与折叠

Delphi 获取随机字符串的方法 thash.getrandomstring

Delphi 获取国外格式日期时间

Delphi 判断是否是0-9数字

Delphi try except语句 和 try finally语句用法以及区别

Delphi 记录类型- 结构指针

Delphi 消息实现窗口最小化,最大化,关闭(Delphi)

webbrowser部分用法

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



打赏

取消

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

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

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

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

评论

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