返回列表 发帖

[问题求助] 如何用VBS远程获得AD中客户机器的软件安装列表

需求是这样的,我想知道如何在用户不知道的状态下获得这台计算机的appwiz的列表。

木有人会么

TOP

回复 2# dog542
我不会…但是度娘知道:
获取域内电脑所安装的软件(VBS)  
http://blog.163.com/huang_senlin ... 910920108297836601/
2010-09-29 19:08:36

这两天老大要查每台电脑安装了哪些软件,200台电脑呀,快跑得蹆抽筋啦!!没办法,只好想点法子!因为所有电脑已经加入域,好办,用组策略脚本,在此分享给需要的朋友。以下脚本功能:把注册表的软件列表读出来,然后写入一个文本文件!FilePath为这个文件保存的路径。另外,此列表筛选去除了一些系统的补丁更新。
'*************************************************
' 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"
Set Wshell         = CreateObject("Wscript.Shell")   
Set objFSO         = CreateObject("Scripting.FileSystemobject")   
'*****************************************************************
'Get the computer name!!!!
'*****************************************************************
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
strComputer = WshNetwork.ComputerName  
'*****************************************************************
'Delete the txt file if it is exist !!!!
'*****************************************************************
Set MyFile = objFSO.GetFile(FilePath & WshNetwork.ComputerName &".txt")
MyFile.Delete
'*****************************************************************
'Create the txt file and write the application list to the file !!!!
'*****************************************************************
Set textWriteFile  = objFSO.OpenTextFile(FilePath & WshNetwork.ComputerName &".txt",forappending,True)
Do      
Set 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.CloseCOPY
『千江有水千江月』千江有水,月映千江;万里无云,万里青天。    http://yu2n.qiniudn.com/

TOP

返回列表