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提取网页中的图片

Delphi twebbrowser流程讲解及如何判断下载网页成功

Delphi取得当前目录的上一级目录

Delphi urldownloadtofile 实现文件下载

Delphi ado连接数据库

Delphi 统计中英文字个数的例子

Delphi中使用可修改的常量

Delphi 简单实习窗体靠边隐藏

Delphi idhttp访问http与https不同点

Delphi货币类型转中文大写金额

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



打赏

取消

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

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

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

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

评论

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