Computadora - General
Spoiler
Code: Select all
ComObjError(false)
for strCSItem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystem")
{
PC_AutomaticManagedPagefile := strCSItem.AutomaticManagedPagefile
PC_BootOptionOnLimit := strCSItem.BootOptionOnLimit
PC_NameFormat := strCSItem.NameFormat
PC_AdminPasswordStatus := strCSItem.AdminPasswordStatus
PC_AutomaticResetBootOption := strCSItem.AutomaticResetBootOption
PC_AutomaticResetCapability := strCSItem.AutomaticResetCapability
PC_BootROMSupported := strCSItem.BootROMSupported
PC_BootupState := strCSItem.BootupState
PC_Caption := strCSItem.Caption
PC_ChassisBootupState := strCSItem.ChassisBootupState
PC_CurrentTimeZone := strCSItem.CurrentTimeZone
PC_DaylightInEffect := strCSItem.DaylightInEffect
PC_Description := strCSItem.Description
PC_Domain := strCSItem.Domain
PC_DomainRole := strCSItem.DomainRole
PC_EnableDaylightSavingsTime := strCSItem.EnableDaylightSavingsTime
PC_FrontPanelResetStatus := strCSItem.FrontPanelResetStatus
PC_InfraredSupported := strCSItem.InfraredSupported
PC_KeyboardPasswordStatus := strCSItem.KeyboardPasswordStatus
PC_Manufacturer := strCSItem.Manufacturer
PC_Name := strCSItem.Name
PC_NetworkServerModeEnabled := strCSItem.NetworkServerModeEnabled
PC_NumberOfLogicalProcessors := strCSItem.NumberOfLogicalProcessors
PC_NumberOfProcessors := strCSItem.NumberOfProcessors
PC_OEMStringArray := strCSItem.OEMStringArray
PC_PartOfDomain := strCSItem.PartOfDomain
PC_PauseAfterReset := strCSItem.PauseAfterReset
PC_PowerOnPasswordStatus := strCSItem.PowerOnPasswordStatus
PC_PowerState := strCSItem.PowerState
PC_PowerSupplyState := strCSItem.PowerSupplyState
PC_PrimaryOwnerContact := strCSItem.PrimaryOwnerContact
PC_PrimaryOwnerName := strCSItem.PrimaryOwnerName
PC_ResetCapability := strCSItem.ResetCapability
PC_ResetCount := strCSItem.ResetCount
PC_ResetLimit := strCSItem.ResetLimit
PC_Roles := strCSItem.Roles
PC_Status := strCSItem.Status
PC_SupportContactDescription := strCSItem.SupportContactDescription
PC_SystemStartupDelay := strCSItem.SystemStartupDelay
PC_SystemStartupOptions := strCSItem.SystemStartupOptions
PC_SystemStartupSetting := strCSItem.SystemStartupSetting
PC_SystemType := strCSItem.SystemType
PC_ThermalState := strCSItem.ThermalState
PC_TotalPhysicalMemory := Round(strCSItem.TotalPhysicalMemory/(1024*1024),0) . " MB"
PC_UserName := strCSItem.UserName
PC_WakeUpType := strCSItem.WakeUpType
PC_Workgroup := strCSItem.Workgroup
PC_Model := strCSItem.Model ;MODELO
}
Computadora - Producto Del Sistema
Spoiler
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystemProduct")
{
PRODUCT_Caption := objItem.Caption ;producto del sistema informatico
PRODUCT_Description := objItem.Description
PRODUCT_IdentifyingNumber := objItem.IdentifyingNumber ;numero de identificacion
PRODUCT_Name:= objItem.Name
PRODUCT_SKUNumber := objItem.SKUNumber
PRODUCT_UUID := objItem.UUID
PRODUCT_Vendor := objItem.Vendor ;proveedor
PRODUCT_Version := objItem.Version ;version
}
Sistema Operativo: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_OperatingSystem")
{
System_FreePhysicalMemory := Round(object.FreePhysicalMemory / 1024, 2) " MB"
System_FreeSpaceInPagingFiles := Round(object.FreeSpaceInPagingFiles / 1024, 2) " MB"
System_TotalVirtualMemorySize := Round(object.TotalVirtualMemorySize / 1024, 2) " MB" ;RAM TOTAL
System_TotalVisibleMemorySize := Round(object.TotalVisibleMemorySize / 1024, 2) " MB" ;RAM LIBRE
System_UsedVirtualMemory := Round(((object.TotalVisibleMemorySize - object.FreePhysicalMemory) / 1024), 2) " MB" ;RAM EN USO
System_FreeVirtualMemory := Round(object.FreeVirtualMemory / 1024, 2) " MB"
System_NameFormat := object.NameFormat
System_BootDevice := object.BootDevice
System_Organization := object.Organization
System_NumberOfUsers := object.NumberOfUsers
System_RegisteredUser := object.RegisteredUser
System_StartOptions := object.StartOptions
System_Directory := object.Directory
System_Device := object.Device
System_InstallDate := FormatTime(object.InstallDate, 1)
System_LastBootUpTime := FormatTime(object.LastBootUpTime, 1)
System_Version := object.Version
System_BuildType := object.BuildType
System_Description := object.Description
System_Name := object.Name
System_ServicePackMajorVersion := object.ServicePackMajorVersion
System_Manufacturer := object.Manufacturer
System_OSArchitecture := (object.OSArchitecture ? object.OSArchitecture : (A_Is64bitOS ? "x64" : "x32"))
}
RegRead, System_DumpFile, HKEY_LOCAL_MACHINE, System\CurrentControlSet\Control\CrashControl, DumpFile
RegRead, System_MinidumpDir, HKEY_LOCAL_MACHINE, System\CurrentControlSet\Control\CrashControl, MinidumpDir
RegRead, System_StartOptions, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control, SystemStartOptions
Información Del Usuario
Spoiler
Code: Select all
ComObjError(false)
for objSession in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystem")
PC_CurrentUser := objSession.UserName ;USUARIO ACTUAL
Mouse
Spoiler
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_PointingDevice")
{
Mouse_Description := objItem.Description
Mouse_DeviceID := objItem.DeviceID
Mouse_DeviceInterface := objItem.DeviceInterface
Mouse_DoubleSpeedThreshold := objItem.DoubleSpeedThreshold
Mouse_Handedness := objItem.Handedness
Mouse_HardwareType := objItem.HardwareType
Mouse_INFFileName := objItem.InfFileName
Mouse_INFSection := objItem.InfSection
Mouse_Manufacturer := objItem.Manufacturer
Mouse_Name := objItem.Name
Mouse_NumberOfButtons := objItem.NumberOfButtons
Mouse_PNPDeviceID := objItem.PNPDeviceID
Mouse_PointingType := objItem.PointingType
Mouse_QuadSpeedThreshold := objItem.QuadSpeedThreshold
Mouse_Resolution := objItem.Resolution
Mouse_SampleRate := objItem.SampleRate
Mouse_Synch := objItem.Synch
}
DllCall("SystemParametersInfo", UInt, 0x70, UInt, 0, UIntP, Mouse_Speed, UInt, 0)
MouseGetPos, Mouse_X, Mouse_Y, Mouse_ID, Mouse_Control ;obtener informacion según posicion del mouse
Escritorio
Spoiler
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_Desktop")
{
Desktop_BorderWidth := objItem.BorderWidth
Desktop_Caption := objItem.Caption
Desktop_CoolSwitch := objItem.CoolSwitch
Desktop_CursorBlinkRate := objItem.CursorBlinkRate
Desktop_Description := objItem.Description
Desktop_DragFullWindows := objItem.DragFullWindows
Desktop_GridGranularity := objItem.GridGranularity
Desktop_IconSpacing := objItem.IconSpacing
Desktop_IconTitleFaceName := objItem.IconTitleFaceName
Desktop_IconTitleSize := objItem.IconTitleSize
Desktop_IconTitleWrap := objItem.IconTitleWrap
Desktop_Name := objItem.Name
Desktop_Pattern := objItem.Pattern
Desktop_ScreenSaverActive := objItem.ScreenSaverActive
Desktop_ScreenSaverExecutable := objItem.ScreenSaverExecutable
Desktop_ScreenSaverSecure := objItem.ScreenSaverSecure
Desktop_ScreenSaverTimeout := objItem.ScreenSaverTimeout
Desktop_SettingID := objItem.SettingID
Desktop_Wallpaper := objItem.Wallpaper
Desktop_WallpaperStretched := objItem.WallpaperStretched
Desktop_WallpaperTiled := objItem.WallpaperTiled
}
BIOS: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_BIOS")
{
BIOS_Description := object.Description
BIOS_Manufacturer := object.Manufacturer
BIOS_Version := object.Version
}
Adaptador De Red
Spoiler
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration")
{ ;WHERE IPEnabled = True
Network_MacAdress := objItem.MACAddress
Network_Caption := objItem.Caption
Network_DatabasePath := objItem.DatabasePath
Network_Description := objItem.Description
Network_DHCPServer := objItem.DHCPServer
Network_DNSDomain := objItem.DNSDomain
Network_DNSDomainSuffixSearchOrder := objItem.DNSDomainSuffixSearchOrder
Network_DNSHostName := objItem.DNSHostName
Network_DNSServerSearchOrder := objItem.DNSServerSearchOrder
Network_IPAddress := objItem.IPAddress
Network_IPSecPermitIPProtocols := objItem.IPSecPermitIPProtocols
Network_IPSecPermitTCPPorts := objItem.IPSecPermitTCPPorts
Network_IPSecPermitUDPPorts := objItem.IPSecPermitUDPPorts
Network_IPSubnet := objItem.IPSubnet
Network_IPXAddress := objItem.IPXAddress
Network_IPXNetworkNumber := objItem.IPXNetworkNumber
Network_IPXVirtualNetNumber := objItem.IPXVirtualNetNumber
Network_MACAddress := objItem.MACAddress
Network_ServiceName := objItem.ServiceName
Network_SettingID := objItem.SettingID
Network_WINSHostLookupFile := objItem.WINSHostLookupFile
Network_WINSPrimaryServer := objItem.WINSPrimaryServer
Network_WINSScopeID := objItem.WINSScopeID
Network_WINSSecondaryServer := objItem.WINSSecondaryServer
}
Monitor
Spoiler
Code: Select all
SysGet, MonitorCount, MonitorCount
SysGet, MonitorPrimary, MonitorPrimary
SysGet, MonitorName, MonitorName
SysGet, Monitor, Monitor
SysGet, MonitorWorkArea, MonitorWorkArea
Memoria Física: msdn.microsoft.com/en-us/library/aa3943 ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_PhysicalMemory")
{
MEM_Capacity := Round(object.Capacity / (1024 * 1024), 2) " MB"
MEM_Description := object.Description
MEM_Caption := object.Caption
MEM_BankLabel := object.BankLabel
MEM_Model := object.Model
MEM_Manufacturer := object.Manufacturer
MEM_MemoryType := object.MemoryType
MEM_Speed := object.Speed
MEM_Version := object.Version
MEM_SerialNumber := object.SerialNumber
MEM_DeviceLocator := object.DeviceLocator
MEM_InstallDate := FormatTime(object.InstallDate, 1)
}
SysGetMem(raw := 0, decimales := 2) { ;RAM%, PT, PL, PU, RT, RL, RU, VT, VL, VU
VarSetCapacity(memorystatus, 4+4+4+4+4+4+4+4)
DllCall("kernel32.dll\GlobalMemoryStatus", "uint", &memorystatus)
PT := Round(ReadInteger(&memorystatus,16,4, false), decimales) ;ARCHIVO DE P. TOTAL
PL := Round(ReadInteger(&memorystatus,20,4, false), decimales) ;ARCHIVO DE P. LIBRE
PU := TransformValue((PT - PL)) ;ARCHIVO DE P. USO
RP := ReadInteger(&memorystatus,4,4, false) " %" ;porcentaje RAM
RT := Round(ReadInteger(&memorystatus,8,4, false), decimales) ;RAM TOTAL
RL := Round(ReadInteger(&memorystatus,12,4, false), decimales) ;TAM LIBRE
RU := TransformValue((RT - RL)) ;RAM USO
VT := Round(ReadInteger(&memorystatus,24,4, false), decimales) ;VIRTUAL TOTAL
VL := Round(ReadInteger(&memorystatus,28,4, false), decimales) ;VIRTUAL LIBRE
VU := TransformValue((VT - VL)) ;VIRTUAL USO
if (raw = 0)
return RP "`n" TransformValue(RT) "`n" TransformValue(RL) "`n" RU "`n" TransformValue(PT) "`n" TransformValue(PL) "`n" PU "`n" TransformValue(VT) "`n" TransformValue(VL) "`n" VU
return %RP%
}
Dispositivo De Audio: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_SoundDevice")
{
Sound_Description := object.Description
Sound_Caption := object.Caption
Sound_ProductName := object.ProductName
Sound_Name := object.Name
Sound_Manufacturer := object.Manufacturer
Sound_InstallDate := FormatTime(object.InstallDate, 1)
Sound_Status := object.Status
Sound_SystemName := object.SystemName
Sound_MPU401Address := object.MPU401Address
Sound_DeviceID := object.DeviceID
Sound_DMABufferSize := TransformValue(object.DMABufferSize)
}
Memoria Caché
Spoiler
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_CacheMemory")
{
CACHE_Caption := objItem.Caption
CACHE_Name := objItem.Name
CACHE_Location := objItem.Location
CACHE_CreationClassName := objItem.CreationClassName
CACHE_Description := objItem.Description
CACHE_DeviceID := objItem.DeviceID
CACHE_ErrorDescription := objItem.ErrorDescription
CACHE_ErrorMethodology := objItem.ErrorMethodology
CACHE_OtherErrorDescription := objItem.OtherErrorDescription
CACHE_PNPDeviceID := objItem.PNPDeviceID
CACHE_Purpose .= objItem.Purpose "|"
CACHE_Status := objItem.Status
CACHE_SystemCreationClassName := objItem.SystemCreationClassName
CACHE_SystemName := objItem.SystemName
}
BUS
Spoiler
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_Bus")
{
BUS_Caption := objItem.Caption
BUS_CreationClassName := objItem.CreationClassName
BUS_Description := objItem.Description
BUS_DeviceID := objItem.DeviceID
BUS_ErrorDescription := objItem.ErrorDescription
BUS_Name := objItem.Name
BUS_PNPDeviceID := objItem.PNPDeviceID
BUS_Status := objItem.Status
BUS_SystemCreationClassName := objItem.SystemCreationClassName
BUS_SystemName := objItem.SystemName
}
Procesador: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_Processor")
{
PROC_Description := object.Description
PROC_Status := object.Status
PROC_Name := object.Name
PROC_CurrentClockSpeed := Round(object.CurrentClockSpeed / 1000, 2) " Ghz | " Round(object.CurrentClockSpeed, 2) " Mhz"
PROC_MaxClockSpeed := Round(object.MaxClockSpeed / 1000, 2) " Ghz | " Round(object.MaxClockSpeed, 2) " Mhz"
PROC_ExtClock := Round(object.ExtClock / 1000, 2) " Ghz | " Round(object.ExtClock, 2) " Mhz"
PROC_Caption := object.Caption
PROC_Manufacturer := object.Manufacturer
PROC_Caption := object.Caption
PROC_Family := object.Family
PROC_NumberOfProcessors := object.NumberOfProcessors
PROC_Availability := object.Availability
PROC_CpuStatus := object.CpuStatus
PROC_CurrentVoltage := Round((object.CurrentVoltage + 0) / 10, 1)
PROC_DataWidth := object.DataWidth
PROC_InstallDate := FormatTime(object.InstallDate, 1)
PROC_CpuStatus := object.CpuStatus
PROC_L2CacheSize := object.L2CacheSize
PROC_L2CacheSpeed := object.L2CacheSpeed
PROC_L3CacheSize := object.L3CacheSize
PROC_L3CacheSpeed := object.L3CacheSpeed
PROC_LoadPercentage := object.LoadPercentage
PROC_NumberOfCores := object.NumberOfCores
PROC_NumberOfLogicalProcessors := object.NumberOfLogicalProcessors
PROC_ProcessorType := (object.ProcessorType = 1 ? object.Role : object.ProcessorType = 2 ? object.Role : object.ProcessorType = 3 ? "Procesador central" : object.ProcessorType = 4 ? "Procesador Matemático" : object.ProcessorType = 5 ? "Procesador De Señal Digital" : object.ProcessorType = 6 ? "Procesador de vídeo" : object.Role)
PROC_SocketDesignation := object.SocketDesignation
}
Controlador De Video: msdn.microsoft.com/en-us/library/aa3945 ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_VideoController")
{
VIDEO_CurrentBitsPerPixel := object.CurrentBitsPerPixel
VIDEO_CurrentNumberOfColors := object.CurrentNumberOfColors
VIDEO_CurrentScanMode := (object.CurrentScanMode = 1 ? "Otro" : object.CurrentScanMode = 2 ? "Desconocido" : object.CurrentScanMode = 3 ? "Entrelazado" : "No Entrelazado")
VIDEO_CurrentVerticalResolution := object.CurrentVerticalResolution " Píxeles"
VIDEO_DriverDate := object.DriverDate
VIDEO_MaxMemorySupported := object.MaxMemorySupported
VIDEO_MaxNumberControlled := object.MaxNumberControlled
VIDEO_DeviceID := object.DeviceID
VIDEO_NumberOfColorPlanes := object.NumberOfColorPlanes
VIDEO_NumberOfVideoPages := object.NumberOfVideoPages
VIDEO_ProtocolSupported := object.ProtocolSupported
VIDEO_ReservedSystemPaletteEntries := object.ReservedSystemPaletteEntries
VIDEO_SpecificationVersion := object.SpecificationVersion
VIDEO_TimeOfLastReset := object.TimeOfLastReset
VIDEO_DeviceID := object.DeviceID
VIDEO_SystemName := object.SystemName
VIDEO_VideoMode := object.VideoMode
VIDEO_VideoModeDescription := object.VideoModeDescription
VIDEO_VideoProcessor := object.VideoProcessor
VIDEO_Description := object.Description
VIDEO_Caption := object.Caption
VIDEO_InstalledDisplayDrivers := object.InstalledDisplayDrivers
VIDEO_Name := object.Name
VIDEO_VideoArchitecture := object.VideoArchitecture
VIDEO_DriverVersion := object.DriverVersion
VIDEO_AdapterCompatibility := object.AdapterCompatibility
VIDEO_AdapterRAM := TransformValue(object.AdapterRAM)
VIDEO_CurrentRefreshRate := Round(object.CurrentRefreshRate / (1000*1000*1000), 2) " Ghz | " Round(object.CurrentRefreshRate / (1000*1000), 2) " Mhz"
VIDEO_MaxRefreshRate := Round(object.MaxRefreshRate / (1000*1000*1000), 2) " Ghz | " Round(object.MaxRefreshRate / (1000*1000), 2) " Mhz"
VIDEO_MinRefreshRate := Round(object.MinRefreshRate / (1000*1000*1000), 2) " Ghz | " Round(object.MinRefreshRate / (1000*1000), 2) " Mhz"
VIDEO_InstallDate := FormatTime(object.InstallDate, 1)
VIDEO_VideoMemoryType := object.VideoMemoryType
VIDEO_DeviceID := object.DeviceID
VIDEO_DriverDate := object.DriverDate
VIDEO_InfFilename := object.InfFilename
VIDEO_InfSection := object.InfSection
VIDEO_AdapterDACType := object.AdapterDACType
VIDEO_Status := object.Status
VIDEO_Availability := object.Availability
}
Controlador USB: msdn.microsoft.com/en-us/library/aa3945 ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_USBController")
{
USB_Description := object.Description
USB_Caption := object.Caption
USB_ProductName := object.ProductName
USB_Name := object.Name
USB_Manufacturer := object.Manufacturer
USB_InstallDate := FormatTime(object.InstallDate, 1)
USB_Status := object.Status
USB_SystemName := object.SystemName
USB_MaxNumberControlled := object.MaxNumberControlled
USB_DeviceID := object.DeviceID
USB_ColorTableEntries := object.ColorTableEntries
}
Antivirus / Antimalware
Spoiler
Firewall
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\SecurityCenter2").ExecQuery("SELECT * FROM AntiVirusProduct")
{
AV_displayName := objItem.displayName
AV_instanceGuid := objItem.instanceGuid
AV_pathToSignedProductExe := objItem.pathToSignedProductExe
AV_pathToSignedReportingExe := objItem.pathToSignedReportingExe
AV_productState := ((SubStr(DecTo(objItem.productState, 16), 3, 2) = 10) ? "Habilitado" : "Deshabilitado")
AV_AV_productStateT := ((SubStr(DecTo(objItem.productState, 16), 5, 2) = 00) ? "Actualizado" : "Desactualizado")
}
for objItem in ComObjGet("winmgmts:\\.\root\SecurityCenter2").ExecQuery("SELECT * FROM AntiSpywareProduct")
{
AM_displayName := objItem.displayName
AM_instanceGuid := objItem.instanceGuid
AM_pathToSignedProductExe := objItem.pathToSignedProductExe
AM_pathToSignedReportingExe := objItem.pathToSignedReportingExe
AM_productState := ((SubStr(DecTo(objItem.productState, 16), 3, 2) = 10) ? "Habilitado" : "Deshabilitado")
AM_productState := ((SubStr(DecTo(objItem.productState, 16), 5, 2) = 00) ? "Actualizado" : "Desactualizado")
}
DecTo(n, to) {
hex := "0123456789ABCDEF"
while (n > 0)
{
rem := mod(n, to)
n /= to
y := SubStr(hex, rem + 1, 1)
result = %y%%result%
}
return, "0" . result
}
RegRead, SEGURITY_System, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, EnableLUA ;UAC
RegRead, SEGURITY_WuauServ, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Services\wuauserv, Start ;WIN UPDATE
RegRead, SEGURITY_WinDefend, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Services\WinDefend, Start ;WINDOWS DEFENDER SERVICIO
RegRead, SEGURITY_MpsSvc, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Services\MpsSvc, Start ;FIREWALL DE WINDOWS SERVICIO
RegRead, SEGURITY_Start, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Services\wscsvc, Start ;CENTRO DE SEGURIDAD SERVICIO
Spoiler
Code: Select all
ComObjError(false)
for objItem in ComObjGet("winmgmts:\\.\root\SecurityCenter2").ExecQuery("SELECT * FROM FirewallProduct")
{
Firewall_DisplayName := objItem.displayName
Firewall_InstanceGuid := objItem.instanceGuid
Firewall_ProductExe := objItem.pathToSignedProductExe
Firewall_ReportingExe := objItem.pathToSignedReportingExe
Firewall_ProductProtectionState := ((SubStr(DecTo(objItem.productState, 16), 3, 2) = 10) ? "Habilitado" : "Deshabilitado") "`n"
Firewall_ProductUpdateState := ((SubStr(DecTo(objItem.productState, 16), 5, 2) = 00) ? "Actualizado" : "Desactualizado")
}
DecTo(n, to) {
hex := "0123456789ABCDEF"
while (n > 0)
{
rem := mod(n, to)
n /= to
y := SubStr(hex, rem + 1, 1)
result = %y%%result%
}
return, "0" . result
}
Unidad De CDROM
Spoiler
Code: Select all
ComObjError(false)
for objitem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_CDROMDrive")
{
CDROM_Availability := objitem.Availability
CDROM_Capabilities := objitem._Capabilities
CDROM_CapabilityDescriptions := objitem.CapabilityDescriptions
CDROM_Caption := objitem.Caption
CDROM_CompressionMethod := objitem.CompressionMethod
CDROM_ConfigManagerErrorCode := objitem.ConfigManagerErrorCode
CDROM_ConfigManagerUserConfig := objitem.ConfigManagerUserConfig
CDROM_CreationClassName := objitem.CreationClassName
CDROM_DefaultBlockSize := objitem.DefaultBlockSize
CDROM_Description := objitem.Description
CDROM_DeviceID := objitem.DeviceID
CDROM_Drive := objitem.Drive
CDROM_DriveIntegrity := objitem.DriveIntegrity
CDROM_ErrorCleared := objitem.ErrorCleared
CDROM_ErrorDescription := objitem.ErrorDescription
CDROM_ErrorMethodology := objitem.ErrorMethodology
CDROM_FileSystemFlags := objitem._FileSystemFlags
CDROM_FileSystemFlagsEx := objitem.FileSystemFlagsEx
CDROM_Id := objitem.Id
CDROM_InstallDate := objitem.InstallDate
CDROM_LastErrorCode := objitem.LastErrorCode
CDROM_Manufacturer := objitem.Manufacturer
CDROM_MaxBlockSize := objitem.MaxBlockSize
CDROM_MaximumComponentLength := objitem.MaximumComponentLength
CDROM_MaxMediaSize := objitem.MaxMediaSize
CDROM_MediaLoaded := objitem.MediaLoaded
CDROM_MediaType := objitem.MediaType
CDROM_MfrAssignedRevisionLevel := objitem.MfrAssignedRevisionLevel
CDROM_MinBlockSize := objitem.MinBlockSize
CDROM_Name := objitem.Name
CDROM_NeedsCleaning := objitem.NeedsCleaning
CDROM_NumberOfMediaSupported := objitem.NumberOfMediaSupported
CDROM_PNPDeviceID := objitem.PNPDeviceID
CDROM_PowerManagementCapabilities := objitem._PowerManagementCapabilities
CDROM_PowerManagementSupported := objitem.PowerManagementSupported
CDROM_RevisionLevel := objitem.RevisionLevel
CDROM_SCSIBus := objitem.SCSIBus
CDROM_SCSILogicalUnit := objitem._SCSILogicalUnit
CDROM_SCSIPort := objitem._SCSIPort
CDROM_SCSITargetId := objitem._SCSITargetId
CDROM_SerialNumber := objitem._SerialNumber
CDROM_Size := objitem.Size
CDROM_Status := objitem.Status
CDROM_StatusInfo := objitem._StatusInfo
CDROM_SystemCreationClassName := objitem.SystemCreationClassName
CDROM_SystemName := objitem.SystemName
CDROM_TransferRate := objitem.TransferRate
CDROM_VolumeName := objitem.VolumeName
CDROM_VolumeSerialNumber := objitem.VolumeSerialNumber
}
PING
Spoiler
Code: Select all
ComObjError(false)
MsgBox, % Ping() ;IP o Direccion
Ping(IP := "www.google.com") {
global
for objitem in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_PingStatus where Address = '" IP "'") {
PING_Address := objitem.Address
PING_BufferSize := objitem.BufferSize
PING_NoFragmentation := objitem.NoFragmentation
PING_PrimaryAddressResolutionStatus := objitem.PrimaryAddressResolutionStatus
PING_ProtocolAddress := objitem.ProtocolAddress
PING_ProtocolAddressResolved := objitem.ProtocolAddressResolved
PING_RecordRoute := objitem.RecordRoute
PING_ReplyInconsistency := objitem.ReplyInconsistency
PING_ReplySize := objitem.ReplySize
PING_ResolveAddressNames := objitem.ResolveAddressNames
PING_ResponseTime := objitem.ResponseTime
PING_ResponseTimeToLive := objitem.ResponseTimeToLive
PING_RouteRecord := objitem.RouteRecord
PING_RouteRecordResolved := objitem.RouteRecordResolved
PING_SourceRoute := objitem.SourceRoute
PING_SourceRouteType := objitem.SourceRouteType
PING_StatusCode := objitem.StatusCode
PING_Timeout := objitem.Timeout
PING_TimeStampRecord := objitem.TimeStampRecord
PING_TimeStampRecordAddress := objitem.TimeStampRecordAddress
PING_TimeStampRecordAddressResolved := PING_ProtocolAddress
PING_TimeStampRoute := objitem.TimeStampRoute
PING_TimeToLive := objitem.TimeToLive
PING_TypeofService := objitem.TypeofService
}
return objitem.StatusCode = "" OR objitem.StatusCode <> 0 ? 0 : PING_ProtocolAddress " (" PING_BufferSize " Bytes )"
}
Placa Madre, Placa Base, MoBo o Motherboard: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_BaseBoard") {
BOARD_Description := object.Description
BOARD_Status := object.Status
BOARD_Name := object.Name
BOARD_Model := object.Model
BOARD_Fabricante := object.Fabricante
BOARD_Product := object.Product
BOARD_Version := object.Version
BOARD_Tag := object.Tag
BOARD_SerialNumber := object.SerialNumber
BOARD_InstallDate := FormatTime(object.InstallDate, 1)
BOARD_ConfigOptions := object.ConfigOptions
BOARD_Depth := object.Depth
}
Administrar Servicios: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Spoiler
Code: Select all
ComObjError(false)
;OBTENER INFORMACIÓN
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_BaseService")
MsgBox, % "Servicio: " Object.Name "`n"
. "Nombre: " object.DisplayName "`n"
. "Descripcion: " Object.Description
;EJEMPLO DE COMO DETENER UN SERVICIO: http://msdn.microsoft.com/en-us/library/aa393673(v=vs.85).aspx
servicio := "spooler" ;cola de impresion
for object in ComObjGet("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_BaseService WHERE NAME = '" servicio "'")
if (object.StopService() = 0)
MsgBox, 0, Detener Servicio, Servicio %servicio% detenido.
else if (object.StopService() = 10)
MsgBox, 0, Detener Servicio, El Servicio %servicio% Ya Se Encuentra Detenido.
else
MsgBox, 0, Detener Servicio, Error Al Detener El Servicio %servicio%.
Funciones Apartes:
Spoiler
Continuara ..Code: Select all
FormatTime(y, x := 0) {
FormatTime, FormatTime, %y%, %x%
if (x)
FormatTime, FormatTime, %y%, dd/MM/yyyy (HH:mm:ss tt)
return FormatTime
}
TransformValue(value, decimales := 2, type := 1024) {
value := StrGetNum(value, 0, "[^0-9,.]") " Bytes"
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en bytes es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " KB" ;obtener peso en KiloByte
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en kilobyte es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " MB" ;obtener peso en MegaBytes
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en megabytes es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " GB" ;obtener peso en GigaBytes
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en gigabytes es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " TB" ;obtener peso en TeraBytes
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en terabytes es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " PB" ;obtener peso en PetaBytes
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en petabytes es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " EB" ;obtener peso en ExaBytes
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en exabytes es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " ZB" ;obtener peso en ZettaBytes
if (StrGetNum(value, 0, "[^0-9,.]") >= type) ;si el peso en exabytes es mayor o igual a type, entonces:
value := Round(StrGetNum(value, 0, "[^0-9,.]") / type, StrGetNum(decimales, 0, "[^0-9,.]")) " YB" ;obtener peso en YottaBytes
return value
}
StrGetNum(text, space := 0, raw := "[^0-9]") {
return RegExReplace(text, space ? "[^0-9 ]" : raw)
}
Otros Enlaces Referidos: AHK - WMI - Snippets (jNizM) | Common WMI task (tank)