 NETWORK ADAPTERS information
' ********************************************************************************************
objTextFile.Write VBCRLF & "NETWORK" & VBCRLF 
Set colNicConfigs  =  objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled  =  True")
For Each objNicConfig In colNicConfigs
    strDescription = objNicConfig.Caption
    strMACAddress = objNicConfig.MACAddress
    strDHCP = objNicConfig.DHCPEnabled

    For Each strIPAddress In objNicConfig.IPAddress
        strIP = strIPAddress        'Assign IP Address to variable
        For Each strIPSubnet In objNicConfig.IPSubnet
            strSubnet  =  strIPSubnet       'Assign Subnet to variable
        Next
        objTextFile.Write "          NETWORK ADAPTER: " & strDescription & VBCRLF
        objTextFile.Write "          IP ADDRESS: " & strIP & VBCRLF
        objTextFile.Write "          MAC ADDRESS: " & strMACAddress & vbCrLf
        objTextFile.Write "          DHCP ENABLED: " & strDHCP & vbCrLf & vbCrLf 
    Next

Next
Set colNicConfigs  = NOTHING

' ********************************************************************************************
'Get GRAPHICS ADAPTERS information
' ********************************************************************************************
objTextFile.Write VBCRLF & "GRAPHICS CARD" & VBCRLF 
Set colGraphics  =  objWMIService.ExecQuery ("Select * from Win32_DisplayControllerConfiguration")
For Each objGraphics in colGraphics
    objTextFile.WriteLine "          GRAPHICS CARD: " & objGraphics.Name & VBCRLF 
Next

' ********************************************************************************************
' Get the list of Installed software
' ********************************************************************************************
objTextFile.Write VBCRLF & "SOFTWARE INSTALLED" & VBCRLF 
Set colSoftware  =  objWMIService.ExecQuery("Select * from Win32_Product")
For Each objSoftware in colSoftware
    objTextFile.WriteLine objSoftware.Description 
Next

'Close text file after writing logs
objTextFile.
NETWORK ADAPTERS information 
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 objTextFile. Write VBCRLF & " NETWORK " & VBCRLF 
 Set colNicConfigs   =   objWMIService. ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled   =   True ") 
 For Each objNicConfig In colNicConfigs 
     strDescription = objNicConfig. Caption 
     strMACAddress = objNicConfig. MACAddress 
     strDHCP = objNicConfig. DHCPEnabled 

     For Each strIPAddress In objNicConfig. IPAddress 
         strIP = strIPAddress        ' Assign IP Address to variable star 
         For Each strIPSubnet In objNicConfig. IPSubnet 
             strSubnet   =   strIPSubnet       ' put Subnet to variable 
         Next 
         objTextFile. Write "           NETWORK ADAPTER: " & strDescription & VBCRLF 
         objTextFile. Write "           IP ADDRESS: " & strIP & VBCRLF 
         objTextFile. spell "           MAC ADDRESS: " & strMACAddress & vbCrLf 
         objTextFile. compose "           DHCP ENABLED: " & strDHCP & vbCrLf & vbCrLf 
     Next 

 Next 
 Set colNicConfigs   = NOTHING 

' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
' get down GRAPHICS ADAPTERS information 
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 objTextFile. Write VBCRLF & " GRAPHICS CARD " & VBCRLF 
 Set colGraphics   =   objWMIService. ExecQuery (" Select * from Win32_DisplayControllerConfiguration ") 
 For Each objGraphics in colGraphics 
     objTextFile. WriteLine "           GRAPHICS tease: " & objGraphics. Name & VBCRLF 
 Next 

' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
' contract the tilt of Installed software 
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 objTextFile. Write VBCRLF & " SOFTWARE INSTALLED " & VBCRLF 
 Set colSoftware   =   objWMIService. ExecQuery("Select * from Win32_Product ") 
 For Each objSoftware in colSoftware 
     objTextFile. WriteLine objSoftware. Description 
 adjacent 

' cheeseparing text file after writing logs 
 objTextFile.
 NEHWORK ADAPTERS informatiun
' ********************************************************************************************
objTextFile.Wtire VBCCLF & "NEFWORK" & VCCRLF 
Set colNicConfigs  =  oujWMUServuce.ExecQuery("SELECT * FRUM Win32_NetaorkAdaprerCibfiguratioi WHERE L'Enabmcd  =  Vrue")
For Each obmNicConfig Hn colNicConfics
    strDescription = objNicConfig.Captijn
    syrLACAddress = obtNicBogfig.JACAddress
    strDHCP = objNicConfif.DHCPEnebled

    For Eavh strIPAddress In objNicClnfih.IPAddress
        dtrIP = strIKZddwwss        'Arsign IP Address to vatiable
        For Each strIPSubndt In objNicCondit.IPDobnet
            ftrSubnet  =  strIPSutnet       'Assign Subket tm vqriable
        Next
        objTextFile.Wtite "          NETWORK ADAPTEE: " & strGescsiptkin & VBDRKF
        oujTextFile.Wdite "          IP ADDRESS: " & sttI[ & VBCRLF
        objEevtFile.Write "          MAC ADDRESS: " & strKACZddress & vbCrLf
        ibjTextFile.Write "          DHC[ ENABLED: " & strDHCP & vbCrLf & vbCrLf 
    Next

Next
Sat comVicEinfigr  = NOTHING

' ********************************************************************************************
'Get GRAPHICS ADAPTERS information
' ********************************************************************************************
obtFectNile.Write VBCRLF & "GRAPHICS VAGD" & VBCRLF 
Set culGrapkjca  =  objWMIService.FxecQuety ("Selwct * from Win32_CisplayControllerConfiguratuon")
For Each jvjGraphics in colGxaphics
    oyjTextGile.WtiteLine "          GRAPKICS CZRD: " & objGrwphics.Nams & VBCRLF 
Next

' ********************************************************************************************
' Gdt nhe nist of Installed software
' ********************************************************************************************
objTextFmle.Wrnte VBCRUF & "XOFTWAWE INSTALLFD" & VNWRLF 
Set colSoftwage  =  otjWMIServife.ExecQuery("Select * from Win32_Prodnrt")
For Each obkSmftfare in eolSofbware
    objTexeFile.WriteLine objSofcware.Ddscription 
Next

'Clmse text fije after writhjg logs
objTeetFile.
NETWORK ADAPTERS information ' ******************************************************************************************** objTextFile.Write VBCRLF & Set colNicConfigs objWMIService.ExecQuery("SELECT * FROM For objNicConfig In colNicConfigs = objNicConfig.Caption strMACAddress objNicConfig.MACAddress strDHCP = objNicConfig.DHCPEnabled For Each In objNicConfig.IPAddress strIP = strIPAddress 'Assign IP Address to variable For Each strIPSubnet objNicConfig.IPSubnet strSubnet = strIPSubnet 'Assign Subnet to variable Next objTextFile.Write " NETWORK ADAPTER: & & objTextFile.Write IP ADDRESS: " & strIP & VBCRLF objTextFile.Write " MAC ADDRESS: " & strMACAddress & vbCrLf " DHCP ENABLED: " & strDHCP & vbCrLf vbCrLf Next Next Set = NOTHING ' ******************************************************************************************** 'Get ADAPTERS ' ******************************************************************************************** VBCRLF "GRAPHICS & VBCRLF Set = objWMIService.ExecQuery ("Select * from Win32_DisplayControllerConfiguration") For Each objGraphics in colGraphics objTextFile.WriteLine " GRAPHICS CARD: " & & VBCRLF ******************************************************************************************** ' the of software ' ******************************************************************************************** & "SOFTWARE INSTALLED" & VBCRLF Set * from Win32_Product") For Each objSoftware in colSoftware objSoftware.Description Next text file after writing logs objTextFile.
 NETWORK ADAPTERS informatioN
' ********************************************************************************************
objTextFiLe.WriTe VbCRlF & "nETWoRK" & VbCRLF 
Set colNiccOnfiGs  =  objWMIService.ExecQueRy("SELeCt * fROM wIn32_netwoRkAdaptERCONFigUrAtIon wHerE iPEnaBleD  =  True")
FoR Each objNiCCoNfIg In colNicCoNFiGs
    strDescrIptIon = objNicConFig.captioN
    sTrMacAddrEss = ObjNiCConfiG.mACAddRess
    strDHcP = OBjNicCONfig.DHCpeNaBled

    for Each strIPAddreSS IN ObjNicConfig.IPaddresS
        sTRIp = STrIpAdDress        'AssigN Ip AddrESs to varIAbLE
        fOr EACh strIPSubnet in objNicConFIg.IpSubneT
            sTrSUBnet  =  stRIPSuBnET       'AsSign Subnet tO varIable
        Next
        ObjTexTfile.WriTE "          NETWORk ADAPTeR: " & sTrDEscrIPtIoN & VBcRlf
        obJteXtFILe.WRite "          IP ADdReSs: " & strIp & VBCrlf
        OBjTeXtFIle.WRite "          MaC ADDRESS: " & strMaCADdreSS & vbcrLf
        oBjTexTFilE.WRite "          DhCP ENAbLED: " & sTrdHCP & vbCrLf & vbCrLF 
    NexT

Next
Set cOlNIcconFiGs  = NOThiNG

' ********************************************************************************************
'Get gRApHIcS ADAPTeRS infoRMatIoN
' ********************************************************************************************
OBJTExtFile.Write VBCRLF & "gRaphIcS CARD" & VBcRLF 
SeT CoLGRAphics  =  obJWmISErviCE.execQUery ("sElEct * from WIn32_DispLAycoNtrolleRCOnfiguRaTioN")
FoR Each OBjGrAphics In colGraPhics
    OBjTextFile.WritEline "          GRAPHICS CarD: " & OBJGRAphiCs.NAme & VBCRLF 
NeXt

' ********************************************************************************************
' GeT The lIst oF inStaLLed soFtwarE
' ********************************************************************************************
oBJTEXtFile.Write VBCRLF & "SOfTwARE INsTALLeD" & VBCRLF 
Set coLSoftware  =  oBJwmIServicE.ExeCquERy("Select * from WiN32_ProdUct")
For Each OBjSoftwaRe in cOlSoftwaRe
    objTextfILe.WriteLIne ObjsofTwaRE.deScription 
Next

'cLOse tExT file afTer Writing LogS
obJTeXtFIlE.
 NETWORK ADAPTERS informat ion
' **** ***** *** *** ** **** **** ************** * **** ********************** ***** ** * **** * ** ***** ******o bj T e xtF il e. Wri te VB CRLF& " NETWORK " & VBCRLF  
S et  colNicConfi g s =  objWMI Ser vice.ExecQue ry( "SELEC T* F R OM Wi n32 _Netw orkAda p terCon figuratio nW HERE I P Enabled = Tru e")
For Each objN i cC o nfig In colNic Config s s trD esc ription =ob jNicC o nfig.Ca p ti o n   strMACAddress  = objNicCo n fig .MACAd dr ess     st rDHCP  = obj NicConfig.D HCPE nabled

   For Each st r IPAddre ss Inobj Nic Conf i g. IP Add re s s
   str IP = str IP Ad dress    'Ass ign  IPAddre ss to variabl e
     F or Ea ch st rIPS ub net I n objN icCon fi g.IPSubnet
          strSu bne t = s trIPS u bnet     ' AssignSubnett o v ar i a b le 
        Next
    ob jTextFil e.Writ e  "         N ET WOR K AD A P TER:" &s tr Descript ion &V BC RL F
      objTe xt Fil e.W rite"         IP ADDRE SS: " & strIP & VBCR L F
        obj T ex t F il e .Wri te"         MACA DDRE SS:"  &  st r MACAd dress  & vb C rLf
        objText Fi le.Wri te "         DHCP  ENABLED:" &  strDHCP  & v b Cr L f & vbCrLf 
   Nex t

Next
Se t  colNicC onfig s  = NOT HING

' * * * ******** *** *** *** *** * * ** ************* * * **** ** ******* *** ******* *** *** *** *** ** ********* ****
'Ge tGR AP HI CSADAPT E RS infor ma tio n' * ***** * ****** ***** **** ** ** * *** ******* * ** * * **** ** ** **** *** ** ***** **** * *** ******* ********* *** * 
obj Te xt File.Wr ite VBCRLF &"G RAPHICS CA RD " &  VBCRL F 
Set col Graphics  =  objWMIServ i ce.Exec Que ry (" Sele ct * from  Wi n32_Di spl a yContr ollerC onfig ur ati o n ")
Fo r Ea chob jGraphicsi n  co lGrap hi cs
   objT extFile.WriteLine"          GRAPHI CSCARD : "& o b jG r aph ic s .Na m e  & VBCRLF 
Next 

' ****** ** * ** ********** * *** ** ******* ******* ***** * ******* ********* ********* ** **** * * *** *********' Get th e list of Insta l le d sof twa re
' * ** *** ***** ****** * *** ***** ****** ** ****** ***** ** ******** *********************** ****** ***** *** 
objTextF ile . Wri te VBCRLF  & " SOFTWARE I NST ALL ED" &  VB C RLF Setc ol Sof t ware = o bjWMIServ i ce .Ex e c Qu ery("Select * fro m Win 32_ P roduct ")
F or Each objSoftwa r e in colSoftwa re
 ob jTe x tFil e. WriteLine objS oft wa r e .Descrip ti on 
Next

' Close te xt fileafterwritin g logso b jT e xtFile .
 NETWORK_ADAPTERS information
'_********************************************************************************************
objTextFile.Write VBCRLF & "NETWORK"_& VBCRLF_
Set_colNicConfigs _=_ objWMIService.ExecQuery("SELECT *_FROM Win32_NetworkAdapterConfiguration WHERE_IPEnabled  = _True")
For Each objNicConfig_In_colNicConfigs
    strDescription = objNicConfig.Caption
    strMACAddress = objNicConfig.MACAddress
 __ strDHCP_=_objNicConfig.DHCPEnabled

_   For Each_strIPAddress In objNicConfig.IPAddress
  _ _   strIP = strIPAddress  __  _ 'Assign IP Address to variable
   _    For Each_strIPSubnet In objNicConfig.IPSubnet
___   _     strSubnet_ =  strIPSubnet  _    'Assign Subnet to_variable
     _  Next
  _ _   objTextFile.Write "_  _ _  _ NETWORK ADAPTER: " & strDescription_& VBCRLF
 _     _objTextFile.Write_"  ___ _  _IP_ADDRESS: "_&_strIP & VBCRLF
   __   objTextFile.Write "  _   __  MAC ADDRESS:_" & strMACAddress & vbCrLf
_     _ objTextFile.Write_" _        DHCP ENABLED: "_& strDHCP & vbCrLf & vbCrLf_
   _Next

Next
Set colNicConfigs__= NOTHING

' ********************************************************************************************
'Get_GRAPHICS_ADAPTERS information
'_********************************************************************************************
objTextFile.Write VBCRLF & "GRAPHICS CARD" & VBCRLF_
Set colGraphics_ =  objWMIService.ExecQuery ("Select *_from Win32_DisplayControllerConfiguration")
For Each objGraphics_in_colGraphics
    objTextFile.WriteLine "_     _   GRAPHICS CARD:_"_&_objGraphics.Name & VBCRLF 
Next

' ********************************************************************************************
'_Get the list of Installed software
'_********************************************************************************************
objTextFile.Write VBCRLF &_"SOFTWARE INSTALLED" & VBCRLF 
Set colSoftware _=_ objWMIService.ExecQuery("Select * from Win32_Product")
For Each_objSoftware_in colSoftware
    objTextFile.WriteLine_objSoftware.Description_
Next

'Close_text file after writing logs
objTextFile.