welcome to 's blog...


公告

我的分类(专题)

日志更新

最新评论

留言板

链接

搜索


Blog信息




钉子兄你的Blog不能流言多保重,谢谢<      >今天我好无聊又写了个脚本
aku1 发表于 2006-6-6 16:56:24

查找电脑软体,并输出成htm,哈哈

Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("C:\FSO\ScriptLog.htm", ForWriting)


strHost = "."
Const HKLM = &H80000002
Set objReg = GetObject("winmgmts://" & strHost & _
    "/root/default:StdRegProv")
Const strBaseKey = _
    "Software\Microsoft\Windows\CurrentVersion\Uninstall\"
objReg.EnumKey HKLM, strBaseKey, arrSubKeys
 

objFile.WriteLine "<html>"
          objFile.WriteLine "<head>"
          objFile.WriteLine "<title>Process Report</title>"
          objFile.WriteLine "</head>"
          objFile.WriteLine "<body>"
          objFile.WriteLine "<h1>SoftWare Report -- Date: " & Now() & _
          "</h1>" & vbCrLf
          objFile.WriteLine "<table border=1>"
For Each strSubKey In arrSubKeys
    intRet = objReg.GetStringvalue(HKLM, strBaseKey & strSubKey, _
        "DisplayName", strvalue)

    If intRet <> 0 Then
        intRet = objReg.GetStringvalue(HKLM, strBaseKey & strSubKey, _
        "QuietDisplayName", strvalue)
    End If
    If (strvalue <> "") and (intRet = 0) Then
         
          objFile.WriteLine "<tr>"
          objFile.WriteLine _
       "<td>Installed Software....:</td><td>"  & strvalue & "</td>"
         objFile.WriteLine "</tr>"

    End If

Next
         objFile.WriteLine  "<Font size=3 color=Red>_______________________________________张春良原创</font>"
         objFile.WriteLine "</body>"
         objFile.WriteLine "</html>"
         objFile.Close


阅读全文 | 回复(1) | 引用通告 | 编辑


Re:钉子兄你的Blog不能流言多保重,谢谢<      >今天我好无聊又写了个脚本
cndgm发表评论于2006-6-6 17:39:22

谢谢,你这样一说,我才发现原来评论和留言的程序有错..现在改过来了.


个人主页 | 引用 | 返回 | 删除 | 回复


发表评论:

    昵称:
    密码: (游客无须输入密码)
    主页:
    标题:



Powered by Oblog.