【发布时间】:2018-09-11 13:01:16
【问题描述】:
我想通过tcl脚本检查windows服务是否已经安装。 请注意,我使用的是 ActiveTcl.8.6.7 版本。
提前致谢。
【问题讨论】:
标签: windows-services tcl
我想通过tcl脚本检查windows服务是否已经安装。 请注意,我使用的是 ActiveTcl.8.6.7 版本。
提前致谢。
【问题讨论】:
标签: windows-services tcl
registry 包(Windows 上的标准)可用于查看实际设置服务的位置。
package require registry
set services [registry keys {HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services}]
if {$yourServiceName in $services} {
puts "It is installed"
} else {
puts "No $yourServiceName in [join $services ,]"
}
(检查这对你有用!我在错误的操作系统上为你测试它......)
【讨论】:
$servicename。