展开全部
dim src,i,info,sum
set src=getobject( "winmgmts:root/cimv2" ).execquery("select * from win32_service" )
set fso=createobject("scripting.filesystemobject")
for each i in src
sum=clng(30-len(i.name)+len(i.state))
info=info&i.name&string(sum,chr(32))&i.state&chr(13)
next
if right(info,1)=chr(13) then info=left(info,len(info)-1)
fso.createtextfile("save_Servicesinfo.txt").write info
set src=getobject( "winmgmts:root/cimv2" ).execquery("select * from win32_service" )
set fso=createobject("scripting.filesystemobject")
for each i in src
sum=clng(30-len(i.name)+len(i.state))
info=info&i.name&string(sum,chr(32))&i.state&chr(13)
next
if right(info,1)=chr(13) then info=left(info,len(info)-1)
fso.createtextfile("save_Servicesinfo.txt").write info
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询