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中message消息的使用方法

Delphi zlib 流压缩解压

Delphi使用正则匹配网页数据

Delphi access violations 问题的解决之道

Delphi rest 服务器返回utf16编码转换成正常string

Delphi like 通配符的使用

Delphi 实现窗口记住关闭时的坐标位置

Delphi 遍历所有目录和子目录下的文件名(可按后缀名遍历)

Delphi程序不受windows日期格式的影响

Delphi固定窗口大小

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



打赏

取消

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

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

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

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

评论

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