Inventario - Base - Copia - Vbs
Inventario - Base - Copia - Vbs
Inventario - Base - Copia - Vbs
Err.Clear
End If
Dim d : d = Date()
Dim dateStr : dateStr = Year(d) & "-" & Right("00" & Month(d), 2) & "-" &
Right("00" & Day(d), 2)
strComputer = "."
strUserName = "Administrador"
strPassword = "*Rollo48*" 'Poner la contrase�a entre las comillas
strPath = "\\192.168.0.14\Test"
fullpath = objFSO.GetAbsolutePathName(folderName)
WScript.Echo "El inventario se guardar� de forma local en: " & fullpath
Else
fullpath = strPath
WScript.Echo "El inventario se guardar� en el recurso: " & fullpath
Err.Clear
End If
'-----------------------------------------------------EQUIPO
--------------------------------------
strFullName = fullpath & "\" & "01_HW_" & strFileName & "_" & dateStr
Set objLogFile = objFSO.CreateTextFile(strFullName & ".csv", ForWriting, True)
objLogFile.Writeline
objLogFile.Write "EQUIPO VIA WMI"
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Write "EQUIPO VIA REGISTRO"
objLogFile.Writeline
objLogFile.Writeline
strRegKey = "SYSTEM\CurrentControlSet\Control\"
strRegSub1 = "SystemInformation"
strRegSub2 = "ComputerName\ComputerName"
strRegSub3 = "Session Manager\Environment"
strRegKey1 = "SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters"
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Write "FIN DE REPORTE"
objLogFile.Writeline
objLogFile.Close
'-----------------------------------------------------SISTEMA
OPERATIVO----------------------------
strFullName = fullpath & "\" & "02_SO_" & strFileName & "_" & dateStr
Set objLogFile = objFSO.CreateTextFile(strFullName & ".csv", ForWriting, True)
objLogFile.Writeline
objLogFile.Write "SISTEMA OPERATIVO VIA WMI"
objLogFile.Writeline
objLogFile.Writeline
Next
objLogFile.Writeline
objLogFile.Write "SISTEMA OPERATIVO REGISTRO"
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Write "FIN DE REPORTE"
objLogFile.Writeline
objLogFile.Close
'-------------------------------------------LICENCIAMIENTO DE
WINDOWS--------------------------------
strFullName = fullpath & "\" & "03_Lic_" & strFileName & "_" & dateStr
Set objLogFile = objFSO.CreateTextFile(strFullName & ".csv", ForWriting, True)
objLogFile.Writeline
objLogFile.Write "LICENCIAIENTO"
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Write "FIN DE REPORTE"
objLogFile.Writeline
objLogFile.Close
'--------------------------------------------CONFIGURACION DE
RED-----------------------------------
strFullName = fullpath & "\" & "04_Red_" & strFileName & "_" & dateStr
Set objLogFile = objFSO.CreateTextFile(strFullName & ".csv", ForWriting, True)
objLogFile.Writeline
objLogFile.Write "TARJETAS DE RED"
objLogFile.Writeline
objLogFile.Writeline
If isNull(objItem.IPAddress) Then
objLogFile.Write "" & vbtab
Else
objLogFile.Write Join(objItem.IPAddress, ",") & vbtab
End If
objLogFile.Writeline
Next
objLogFile.Writeline
objLogFile.Write "FIN DE REPORTE"
objLogFile.Writeline
objLogFile.Close
'-------------------------------------------------PRODUCTOS WMI
------------------------------------
strFullName = fullpath & "\" & "05_Prod_" & strFileName & "_" & dateStr
Set objLogFile = objFSO.CreateTextFile(strFullName & ".csv", ForWriting, True)
objLogFile.Writeline
objLogFile.Write "PRODUCTOS VIA WMI"
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Writeline
objLogFile.Write "FIN DE REPORTE"
objLogFile.Writeline
objLogFile.Close
'--------------------------------------------PRODUCTOS REGISTRO
------------------------------------
objLogFile.Writeline
objLogFile.Write "PRODCUTOS VIA REGISTRO"
objLogFile.Writeline
objLogFile.Writeline
Const strBaseKey = _
"Software\Microsoft\Windows\CurrentVersion\Uninstall\"
objReg.EnumKey HKLM, strBaseKey, arrSubKeys
Next
objLogFile.Writeline
objLogFile.Write "FIN DE REPORTE"
objLogFile.Writeline
objLogText.Close