钉子兄你的Blog不能流言多保重,谢谢< >今天我好无聊又写了个脚本
查找电脑软体,并输出成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
历史评论
谢谢,你这样一说,我才发现原来评论和留言的程序有错..现在改过来了.
评论为旧站历史记录,本站不再接受新评论。