基本信息
源码名称:vb获取电脑软硬件信息 示例源码
源码大小:0.03M
文件格式:.rar
开发语言:ASP
更新时间:2018-03-20
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 3 元×
微信扫码支付:3 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'*************************************************
' Script : Check Computer Application List
'Last Mondify:By Alin(slin0511@163.com)
'*************************************************
On Error Resume Next
Const HKLM = &H80000002
Const strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Uninstall\"
Const ForReading = 1
Const ForAppending = 8
'*****************************************************************
'Please change the path of the file where you want to save it!!!!
'*****************************************************************
Const FilePath = "\\publicserver\public\exchange"
Wshell = CreateObject("Wscript.Shell")
objFSO = CreateObject("Scripting.FileSystemobject")
'*****************************************************************
'Get the computer name!!!!
'*****************************************************************
Dim WshNetwork
WshNetwork = WScript.CreateObject("WScript.Network")
strComputer = WshNetwork.ComputerName
'*****************************************************************
'Delete the txt file if it is exist !!!!
'*****************************************************************
MyFile = objFSO.GetFile(FilePath & WshNetwork.ComputerName & ".txt")
MyFile.Delete()
'*****************************************************************
'Create the txt file and write the application list to the file !!!!
'*****************************************************************
textWriteFile = objFSO.OpenTextFile(FilePath & WshNetwork.ComputerName & ".txt", ForAppending, True)
Do
objReg = GetObject("winmgmts://" & strComputer & "/root/default:StdRegProv")
objReg.EnumKey(HKLM, strKeyPath, arrSubKeys)
For Each strSubKey In arrSubKeys
intRet = objReg.GetStringValue(HKLM, strKeyPath & strSubKey, "DisplayName", strValue)
If strValue <> "" And intRet = 0 And InStr(1, strValue, "windows", 1) <= 0 Then
CScript.Echo(strComputer & " " & strValue)
textWriteFile.WriteLine(strComputer & " " & strValue)
End If
If strValue <> "" And intRet = 0 And InStr(1, strValue, "Java", 1) > 0 Then
CScript.Echo(strComputer & " " & strValue)
textWriteFile.WriteLine(strComputer & " " & strValue)
End If
Next
Loop Until objFile.AtEndOfStream
textWriteFile.Close()
objFile.Close()
End Sub
End Class