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 查询进程名进程id/进程路径 父进程/子进程

Delphi 2009 之 tcategorypanelgroup[4]: height

Delphi 文件路径相关的字符串操作

Delphi检查是否在64位windows环境中运行?

Delphi chromium post

Delphi 2007 使用shelltreeview控件

Delphi ticon保存ico文件时失真的解决办法

Delphi fmx关闭安卓程序

Delphi eof 判断文件指针是否移动到了文件未尾

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



打赏

取消

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

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

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

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

评论

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