Sir Arthur
25.02.2010, 08:43
'@ Sir Arthur
Computer = "компьютер" ' хинт локальная машина обозначается .
'class Win32_BaseBoard : CIM_Card
''{
' string Caption;
' string ConfigOptions[];
' string CreationClassName;
' real32 Depth;
' string Description;
' real32 Height;
' boolean HostingBoard;
' boolean HotSwappable;
' datetime InstallDate;
' string Manufacturer;
' string Model;
' string Name;
' string OtherIdentifyingInfo;
' string PartNumber;
' boolean PoweredOn;
' string Product;
' boolean Removable;
' boolean Replaceable;
' string RequirementsDescription;
' boolean RequiresDaughterBoard;
' string SerialNumber;
' string SKU;
' string SlotLayout;
' boolean SpecialRequirements;
' string Status;
' string Tag;
' string Version;
' real32 Weight;
' real32 Width;
'};
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Security)}!\\" & Computer & "\root\cimv2")
Set Items = objWMIService.ExecQuery("SELECT * FROM Win32_BaseBoard")
For Each Item In Items
'Wscript.Echo Item.Product
strAlertToSend =Computer & VbCrLf _
& Item.Manufacturer &": " _
& Item.Product & VbCrLf '_
'Отправляем рузультат в e-mail
Set objMail = CreateObject("CDO.Message")
objMail.From = "от кого "
objMail.To = "кому"
Subject =("Motherboartd Model")
objMail.BodyPart.CharSet = "windows-1251"
objMail.Subject = Subject
objMail.Textbody =strAlertToSend
'You don't need this part if you have an active Outlook [Express] account use an SMTP server
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
' Name or IP of Remote SMTP Server
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "сервер"
' Server port (typically 25)
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Update
' End of SMTP usage
objMail.Send
Wscript.Quit
Exit For
Next
Computer = "компьютер" ' хинт локальная машина обозначается .
'class Win32_BaseBoard : CIM_Card
''{
' string Caption;
' string ConfigOptions[];
' string CreationClassName;
' real32 Depth;
' string Description;
' real32 Height;
' boolean HostingBoard;
' boolean HotSwappable;
' datetime InstallDate;
' string Manufacturer;
' string Model;
' string Name;
' string OtherIdentifyingInfo;
' string PartNumber;
' boolean PoweredOn;
' string Product;
' boolean Removable;
' boolean Replaceable;
' string RequirementsDescription;
' boolean RequiresDaughterBoard;
' string SerialNumber;
' string SKU;
' string SlotLayout;
' boolean SpecialRequirements;
' string Status;
' string Tag;
' string Version;
' real32 Weight;
' real32 Width;
'};
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Security)}!\\" & Computer & "\root\cimv2")
Set Items = objWMIService.ExecQuery("SELECT * FROM Win32_BaseBoard")
For Each Item In Items
'Wscript.Echo Item.Product
strAlertToSend =Computer & VbCrLf _
& Item.Manufacturer &": " _
& Item.Product & VbCrLf '_
'Отправляем рузультат в e-mail
Set objMail = CreateObject("CDO.Message")
objMail.From = "от кого "
objMail.To = "кому"
Subject =("Motherboartd Model")
objMail.BodyPart.CharSet = "windows-1251"
objMail.Subject = Subject
objMail.Textbody =strAlertToSend
'You don't need this part if you have an active Outlook [Express] account use an SMTP server
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
' Name or IP of Remote SMTP Server
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "сервер"
' Server port (typically 25)
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Update
' End of SMTP usage
objMail.Send
Wscript.Quit
Exit For
Next