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 idftp用法

Delphi 刷新系统桌面图标缓存

Delphi ioutils 获取当前目录下所有的文件/文件夹

Delphi dos编程

Delphi access中只取时间的日期部分的函数

Delphi开发桌面图标列表查看程序

Delphi 反转字符串方法2

Delphi经常用到的公共代码(tools.pas)

Delphi中设置系统时间方法

Delphi 熊猫烧香核心源码

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



打赏

取消

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

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

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

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

评论

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