Me pueden ayudar a realizar este scriptCree un script donde pueda visualizar la informacion basica de mi computador y los almacene en un archivo de texto.-RAM total, libre, uso-caracteristicas del procesador-la direccion IPgracias
`___________________________________`CPU |`___________________________________Set oShell = CreateObject("wscript.Shell")Set env = oShell.environment("Process")strComputer = env.Item("Computername") Set objWMIService = GetObject("winmgmts:" & strComputer & "ootCIMV2")Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor") For Each objProcessor in colProcessors info = info & objProcessor.Name nextcpu = info `___________________________________`RAM |`___________________________________ Set oShell = CreateObject("wscript.Shell")Set env = oShell.environment("Process")strComputer = env.Item("Computername") Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!" & strComputer & "ootcimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_Computersystem") For Each Item In colItems ramm = ramm & Round(Item.TotalPhysicalMemory /1073741824,1) Next `___________________________________`IP de máquina y mascara de red |`___________________________________strcomputer = "."Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!" & strComputer & "ootcimv2") Set colItems = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") strCount = 1 For Each objitem in colitems If strCount = 1 Then strIPAddress = Join(objitem.IPAddress, "%") IP = stripaddress strCount = strCount + 1 Else End Ifnext strComputer = "." Set objWMIService = GetObject("winmgmts:" & "!" & strComputer & "ootcimv2") Set colAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True") For Each objAdapter in colAdapters IPdebut = LBound(objAdapter.IPAddress) IPfin = UBound(objAdapter.IPAddress) If (objAdapter.IPAddress(IPdebut) <> "") then For i = IPdebut To IPfin If InStr(objAdapter.IPAddress(i),":") = 0 Then msg = msg & ";" & objAdapter.IPSubnet(i) & vbCrLf mascara = objAdapter.IPSubnet(0) Next End If Next `en IP tenemos la direccion IP y la MAC juntas, las separaremos con la funcion SPLIT con esta funcion creamos un array. En el indice 0 tendremos la direccion IP y en el indice 1 tendremos la MAC.direccionIP = Split(IP,"%")
@echo offecho -------------------------echo Directorio actual:echo.cd >> info.txtecho -------------------------echo Informacion IP:echo.ipconfig/all >> info.txtecho -------------------------echo Informacion del sistema:echo.systeminfo >> info.txtecho -------------------------echo Version de SO:echo.ver >> info.txtecho -------------------------echo Arbol de archivos:echo.tree /a /f >> info.txtecho -------------------------echo Volumen del disco:echo.vol >> info.txtecho -------------------------pause > nul