国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

用vbs列出機器上所有能調用的組件

2020-07-26 11:55:47
字體:
來源:轉載
供稿:網友

'要用到regtool.ocx,請下載regtool.ocx,用前請

regsvr32 regtool.ocx 

核心代碼

set wshshell = CreateObject("WScript.Shell") set registry = CreateObject("regtool.tob") '獲取一個dictionary對象存儲鍵名 set dict = CreateObject("Scripting.Dictionary") '列舉HKEY_CLASSES_ROOT中所有鍵 set allkeys = registry.RegEnum("HKCR/") '排除所有鍵中鍵名有點的。 for each key in allkeys '第1個點在哪兒(跳過初始點)? pos = Instr(2, key, ".") if pos>0 then 'there's a dot. Is there another one? pos2 = Instr(pos+1, key, ".") if pos2>0 then 'yes, so this name is version specific 'check whether we already have a 'version-independent progid! independent = left(key, pos2-1) if not dict.Exists(independent) then 'no, store it dict.Add key, 0 end if else 'this one is version-independent. 'do we already have a version-dependent 'progID in store? vdpid = "" for each element in dict if len(element)>len(key) then if left(element, len(key)+1)=key & "." then 'yes, return name vdpid = element exit for end if end if next 'any version dependent progID found? if vdpid="" then 'no, add to store dict.add key, 0 else 'yes, replace dict.Remove vdpid dict.add key, 0 end if end if end if next MsgBox dict.Count & " Objects found!" for each key in dict list = list & key & vbCrlf next MsgBox list outputfile = "C:/OBJECT.TXT" set fs = CreateObject("Scripting.FileSystemObject") set output = fs.CreateTextFile(outputfile, true) print dict.Count & " Objects found!" Print list output.close wshshell.run outputfile sub Print(text) '寫信息到記錄文件 output.WriteLine text end sub 

到此這篇關于用vbs列出機器上所有能調用的組件的文章就介紹到這了,更多相關vbs 組件內容請搜索武林網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持武林網!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 靖宇县| 南安市| 南安市| 黄骅市| 南皮县| 礼泉县| 西乌| 通城县| 炎陵县| 佳木斯市| 锡林郭勒盟| 高清| 额济纳旗| 旅游| 泰和县| 徐汇区| 翁源县| 醴陵市| 澜沧| 上思县| 项城市| 马尔康县| 闽清县| 连平县| 永川市| 榆社县| 临沧市| 建德市| 枣庄市| 古交市| 土默特右旗| 南昌市| 鹤岗市| 雷波县| 涿鹿县| 子长县| 黄骅市| 湘西| 哈尔滨市| 西畴县| 龙井市|