{"id":266037,"date":"2015-09-21T12:24:05","date_gmt":"2015-09-21T08:24:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=266037"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=266037","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441\u0431\u043e\u0440\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e \u041f\u041a \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443"},"content":{"rendered":"<p>       <cut\/><br \/>  <b>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0430 \u0441 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c HWINFO, \u041c\u0430\u0440\u0442\u0438\u043d\u043e\u043c \u041c\u0430\u043b\u0438\u043a\u043e\u043c (mm@hwinfo.com), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u044f:<\/b><\/p>\n<p>  \u042f:  <\/p>\n<blockquote><p><i>Hi Martin, my name is Dmitry.<br \/>  I am working system administrator in Russia.<br \/>  I want to do auto hardware reporting from all computers of my company.<br \/>  Idea is run bach file (or something like that) and get text file with current system configuration (or may be sent the report on email).<br \/>  I think you&#8217;re SDK of HWINFO can do that.<br \/>  Can you help me? Thanks!<\/i><\/p><\/blockquote>\n<p>  \u041c\u0430\u0440\u0442\u0438\u043d:  <\/p>\n<blockquote><p><i>It\u2019s possible to do that with the HWiNFO SDK, but it\u2019s not freeware and the price starts from 1000 EUR per year (including updates&#038;support). So I\u2019m not sure if this would be a choice for you.<\/i><\/p><\/blockquote>\n<p>  \u0412 \u0436\u0438\u0437\u043d\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u043b\u044e\u0431\u043e\u0433\u043e IT \u043e\u0442\u0434\u0435\u043b\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0430\u0440\u043a\u0430 \u041f\u041a. \u041e\u0434\u043d\u043e \u0434\u0435\u043b\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0434\u043e\u043c\u0435\u043d, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0438\u0445 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e, \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0435\u043d \u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u043d\u0438 \u043f\u043e \u0433\u043e\u0440\u043e\u0434\u0430\u043c \u0438 \u0432\u0435\u0441\u044f\u043c\u2026<br \/>  HWINFO \u0437\u0430 SDK \u043f\u0440\u043e\u0441\u0438\u0442 1000 \u0415\u0432\u0440\u043e \u0437\u0430 \u0433\u043e\u0434\u2026<br \/>  \u041d\u0430\u0444\u0438\u0433 \u043d\u0430\u0434\u043e :), \u043d\u0430\u043f\u0438\u0448\u0443 \u0441\u0430\u043c, \u043d\u0430 Ruby, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0442\u043e \u0443 Windows \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u0430\u043a <a href=\"https:\/\/ru.wikipedia.org\/wiki\/WMI\">Windows Management Instrumentation (WMI)<\/a>.<\/p>\n<h3><b>\u0428\u0430\u0433 1. \u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 WMI<\/b><\/h3>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u2014 \u0434\u0443\u043c\u0430\u044e \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u0442.<br \/>  \u0418\u0442\u0430\u043a, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"ruby\">require 'win32ole' require 'ruby-wmi'  class GetWMIData \tdef initialize(debug=false) \t\t@debug=debug \tend \tdef getWMI(st) \t\twmi = WIN32OLE.connect(&quot;winmgmts:\/\/&quot;) \t\tres = wmi.ExecQuery(&quot;select * from #{st}&quot;) \t\treturn res \tend \tdef getCPU \t\tres=[] \t\tputs &quot;DEBUG: \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440&quot; if @debug \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440===&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_Processor&quot;) do \t\t\tres &lt;&lt; &quot;CPU \u0418\u043c\u044f: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Name}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u0430\u043a\u0441. \u0447\u0430\u0441\u0442\u043e\u0442\u0430: #{get.MaxClockSpeed}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440: #{get.NumberOfCores}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU S\/n: #{get.ProcessorId}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u0420\u0435\u0432\u0438\u0437\u0438\u044f: #{get.Revision}&quot; rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend end <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a:  <\/p>\n<pre><code class=\"ruby\">w=GetWMIData.new puts w.getCPU <\/code><\/pre>\n<p>  \u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430:  <\/p>\n<pre><code class=\"ruby\">ruby&gt;============================ ruby&gt;====\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440=== ruby&gt;============================ ruby&gt;CPU \u0418\u043c\u044f: x86 Family 15 Model 2 Stepping 7 ruby&gt;CPU \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: GenuineIntel ruby&gt;CPU \u041c\u043e\u0434\u0435\u043b\u044c:                 Intel(R) Celeron(R) CPU 2.00GHz ruby&gt;CPU \u041c\u0430\u043a\u0441. \u0447\u0430\u0441\u0442\u043e\u0442\u0430: 2040 ruby&gt;CPU \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440: 1 ruby&gt;CPU S\/n: BFEBFBFF00000F27 ruby&gt;CPU \u0420\u0435\u0432\u0438\u0437\u0438\u044f: 519 <\/code><\/pre>\n<p>  \u0423\u0436\u0435 \u043d\u0435 \u043f\u043b\u043e\u0445\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u0432\u0441\u0435 \u043e\u043d\u0438 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u041e\u0421, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043c\u0430\u0442\u0435\u0440\u0438\u043d\u043a\u0430 \u0438 \u0442.\u0434.) \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043a\u043e\u0434\u0435.<\/p>\n<h3><b>\u0428\u0430\u0433 2. \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443<\/b><\/h3>\n<p>  <\/p>\n<pre><code class=\"ruby\">require 'mail' def mailing(data)\t \tMail.defaults do \t  delivery_method :smtp, address: mail_server, port: mail_port, user_name: mail_user, password: mail_psw \tend \tmail = Mail.new \tmail.from\t\t=\t&quot;mail_from@myil.ru&quot; \tmail.to\t\t=\t&quot;mail_to@admin.ru&quot; \t#\u0417\u0434\u0435\u0441\u044c \u043a \u0442\u0435\u043c\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0438\u043c\u044f \u041f\u041a \u0438 \u0421\u0435\u0440\u0438\u0439\u043d\u0438\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0438         #(\u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u044c\u043c\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c) \tmail.subject\t=\t&quot;\u0422\u0435\u043c\u0430 \u043f\u0438\u0441\u044c\u043c\u0430&quot; \tmail.body\t\t=\t&quot;\u0422\u0435\u043a\u0441\u0442 \u043f\u0438\u0441\u044c\u043c\u0430&quot;+data.join(&quot;\\n&quot;) \tmail.charset\t=\t&quot;UTF-8&quot; \t \t#\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e \tif mail.deliver! \t\tputs &quot;\u041f\u043e\u0447\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430&quot; \t\treturn true  \telse \t\tputs &quot;\u041e\u0428\u0418\u0411\u041a\u0410! \u0421\u0431\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b!&quot; \t\treturn false \tend end <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441 \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u043a\u0430\u043a:  <\/p>\n<pre><code class=\"ruby\">w=GetWMIData.new mailing(w.getCPU) <\/code><\/pre>\n<p>  \u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430, \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 <i>mail_to@admin.ru<\/i> \u043f\u0440\u0438\u0434\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u043e \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <i>\u00ab\u041f\u043e\u0447\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430\u00bb<\/i>.<\/p>\n<h3><b>\u0428\u0430\u0433 3. \u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u0430<\/b><\/h3>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u041f\u041a, \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a \u043e\u0431\u0449\u0435\u0439 \u0441\u0435\u0442\u0438. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0447\u0435\u0442 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u043d\u0435 \u0431\u044b\u043b \u00ab\u043f\u043e\u0434\u0434\u0435\u043b\u0430\u043d\u00bb \u0438\u043b\u0438 \u00ab\u0432 \u0448\u0443\u0442\u043a\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u00bb \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u2014 \u043c\u044b \u0435\u0433\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u0443\u0435\u043c.<br \/>  \u041f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0432 \u044d\u0442\u043e\u043c 7zip:  <\/p>\n<pre><code class=\"ruby\">require 'seven_zip_ruby'  def zipFile(file_to_zip) \tbegin \tFile.open(&quot;\u041e\u0442\u0447\u0435\u0442.7z&quot;, &quot;wb&quot;) do |file| \t\tSevenZipRuby::Writer.open(file, { password: &quot;superpassowrd&quot; }) do |szr| \t\t\tszr.add_file file_to_zip \t\t\tend \t\tend\t \tputs &quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e&quot; \treturn true \trescue =&gt; error \t\tputs &quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0444\u0430\u0439\u043b\u0430&quot; \t\tputs error \t\treturn false \tend\t end <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 <i>zipFile<\/i> \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0442\u043e \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f <i>\u00ab\u041e\u0442\u0447\u0435\u0442.7z\u00bb<\/i>, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <i>\u00absuperpassowrd\u00bb<\/i>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430\u043c \u043f\u043e\u0447\u0442\u043e\u0439 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044e \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u0430\u0440\u043a\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u0435\u0431\u0430\u0433\u0438, \u0438 \u0442\u0430\u043a \u043f\u043e \u043c\u0435\u043b\u043e\u0447\u0438, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<h3><b>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/b><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434, \u0447\u0443\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0432 \u043d\u0435\u043c \u043d\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"ruby\">require 'win32ole' require 'ruby-wmi' require 'mail' require 'socket' require 'seven_zip_ruby'  class GetWMIData  \tdef initialize(debug=false) \t\t@prgrs=0 \t\t@markers=[] \t\t@debug=debug \tend \t \tdef marker(mark=&quot;&quot;) \t\t@markers &lt;&lt; mark \t\treturn @markers \tend  \tdef getWMI(st) \t\twmi = WIN32OLE.connect(&quot;winmgmts:\/\/&quot;) \t\tres = wmi.ExecQuery(&quot;select * from #{st}&quot;) \t\treturn res \tend  \tdef getMB \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u041c\u0430\u0442\u0435\u0440\u0438\u043d\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0430&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u041c\u0430\u0442\u0435\u0440\u0438\u043d\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0430=======&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_BaseBoard&quot;) do \t\t\tres &lt;&lt; &quot;MB \u0418\u043c\u044f: #{get.Description}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Model}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041c\u043e\u0434\u0435\u043b\u044c2: #{get.Product}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041c\u043e\u0434\u0435\u043b\u044c3: #{get.ProductMB}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u0421\u0435\u0440\u0438\u0439\u044b\u0439 \u2116: #{get.SerialNumber}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u0420\u0435\u0432\u0438\u0437\u0438\u044f: #{get.Version}&quot; rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getOS \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430====&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_OperatingSystem&quot;) do \t\t\t#\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u041c\u0430\u0440\u043a\u0435\u0440, \u0437\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u0432 \u0442\u0435\u043c\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \t\t\tself.marker &lt;&lt; &quot;#{get.CSName}&quot; rescue nil \t\t\t#self.marker &lt;&lt; &quot;#{get.SerialNumber}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041f\u041a: #{get.CSName}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u0418\u043c\u044f: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u0421\u0431\u043e\u0440\u043a\u0430: #{get.BuildNumber}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435: #{get.CSDVersion}&quot; rescue nil\t\t \t\t\tres &lt;&lt; &quot;OS \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: #{get.NumberOfUsers}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f: #{get.Organization}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: #{get.RegisteredUser}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS S\/n: #{get.SerialNumber}&quot; rescue nil \t\t\tmem=get.TotalVisibleMemorySize.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;OS \u0412\u0441\u0435\u0433\u043e RAM (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot; \t\tend \t\treturn res \tend  \tdef getCPU \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440===&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_Processor&quot;) do \t\t\t#\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u041c\u0430\u0440\u043a\u0435\u0440, \u0437\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u0432 \u0442\u0435\u043c\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \t\t\tself.marker &lt;&lt; &quot;#{get.ProcessorId}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u0418\u043c\u044f: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Name}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u0430\u043a\u0441. \u0447\u0430\u0441\u0442\u043e\u0442\u0430: #{get.MaxClockSpeed}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440: #{get.NumberOfCores}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU S\/n: #{get.ProcessorId}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u0420\u0435\u0432\u0438\u0437\u0438\u044f: #{get.Revision}&quot; rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getMEM \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u041e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;=====\u041e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c=====&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_PhysicalMemory&quot;) do \t\t\tres &lt;&lt; &quot;MEM \u0421\u043b\u043e\u0442: #{get.BankLabel}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MEM ID \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MEM \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Model}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MEM \u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0448\u0438\u043d\u044b: #{get.Speed}&quot; rescue nil\t\t\t \t\t\tmem=get.Capacity.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;MEM \u041e\u0431\u044a\u0435\u043c (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getVID \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0412\u0438\u0434\u0435\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;=======\u0412\u0438\u0434\u0435\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430========&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_VideoController&quot;) do \t\t\tres &lt;&lt; &quot;VIDEO \u0410\u0434\u0430\u043f\u0442\u0435\u0440: #{get.DeviceID}&quot; rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Description}&quot; rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.AdapterCompatibility}&quot; rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u0427\u0438\u043f: #{get.VideoProcessor}&quot; rescue nil\t\t\t \t\t\tmem=get.AdapterRam.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u041e\u0431\u044a\u0435\u043c (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getHDD \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0416\u0435\u0441\u0442\u043a\u0438\u0435 \u0434\u0438\u0441\u043a\u0438&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;=======\u0416\u0435\u0441\u0442\u043a\u0438\u0435 \u0434\u0438\u0441\u043a\u0438========&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_DiskDrive&quot;) do \t\t\tres &lt;&lt; &quot;HDD \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;HDD \u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: #{get.DeviceID}&quot; rescue nil\t\t\t \t\t\tres &lt;&lt; &quot;HDD \u041c\u043e\u0434\u0435\u043b\u044c: #{get.model}&quot; rescue nil\t \t\t\tmem=get.Size.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;HDD \u041e\u0431\u044a\u0435\u043c (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getPRINT \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u044b&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;===\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u044b===&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_Printer&quot;) do \t\t\tres &lt;&lt; &quot;PRNTR \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435: #{get.Caption}&quot; rescue nil\t\t \t\t\tres &lt;&lt; &quot;PRNTR \u0414\u0440\u0430\u0439\u0432\u0435\u0440: #{get.DriverName}&quot; rescue nil\t\t\t \t\t\tres &lt;&lt; &quot;PRNTR \u041f\u043e\u0440\u0442: #{get.PortName}&quot; rescue nil\t \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getMON \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044b&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;===\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044b====&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_DesktopMonitor&quot;) do \t\t\tres &lt;&lt; &quot;MONITOR \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Description}&quot; rescue nil\t \t\t\tres &lt;&lt; &quot;MONITOR \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.MonitorManufacturer}&quot; rescue nil\t\t\t \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getSOFT \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;==\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b===&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_Product&quot;) do \t\t\tres &lt;&lt; &quot;SOFT \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435: #{get.Caption}&quot; rescue nil\t \t\t\tres &lt;&lt; &quot;SOFT \u0412\u0435\u0440\u0441\u0438\u044f: #{get.Version}&quot; rescue nil\t \t\t\tres &lt;&lt; &quot;SOFT \u0414\u0430\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438: #{get.InstallDate}&quot; rescue nil\t \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getPROC \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b=====&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_process&quot;) do \t\t\tres &lt;&lt; &quot;PROCS \u0418\u043c\u044f: #{get.Name}&quot; rescue nil\t \t\tend \t\treturn res \tend \t \tdef getIP \t\tres=[] \t\t@prgrs+=5 \t\tputs &quot;DEBUG: IP \u0410\u0434\u0440\u0435\u0441\u0430&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;==========IP \u0410\u0434\u0440\u0435\u0441\u0430=========&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_NetworkAdapterConfiguration&quot;) do \t\t\t#\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0439 \t\t\ta=get.IPAddress rescue nil \t\t\tm=get.MACAddress rescue nil \t\t\tif a  \t\t\tres &lt;&lt; &quot;IP Addr: &quot;+a.join(&quot; &quot;) \t\t\tend \t\t\tif m \t\t\tres &lt;&lt; &quot;IP MAC: &quot;+m.to_s \t\t\tres &lt;&lt; &quot; &quot; \t\t\tend \t\tend \t\treturn res \tend end  def avalable?(debug,server,port) \tsock = Socket.new(:INET, :STREAM) \treturn true if sock.connect(Socket.sockaddr_in(port, server))     rescue =&gt; error \t\tputs &quot;DEBUG: \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430&quot; if debug \t\tputs error if debug \treturn false end  def mailing(debug,data,mail_server,mail_port,mail_user,mail_psw,mail_from,mail_to,mail_subj,mail_text,markers)\t \tMail.defaults do \t  delivery_method :smtp, address: mail_server, port: mail_port, user_name: mail_user, password: mail_psw \tend \tmail = Mail.new \tmail.from\t\t=\tmail_from \tmail.to\t\t\t=\tmail_to \t#\u0417\u0434\u0435\u0441\u044c \u043a \u0442\u0435\u043c\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0438\u043c\u044f \u041f\u041a \u0438 \u0421\u0435\u0440\u0438\u0439\u043d\u0438\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0438 \t#(\u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u044c\u043c\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c) \tmail.subject\t=\tmail_subj+markers.join(&quot;. &quot;) \tmail.body\t\t=\tmail_text+data.join(&quot;\\n&quot;) \tmail.charset\t=\t&quot;UTF-8&quot; \t \tputs &quot;DEBUG: \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u0443&quot; if debug \tif mail.deliver! \t\tputs &quot;DEBUG: \u041f\u043e\u0447\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430&quot; if debug \t\treturn true  \telse \t\tputs &quot;DEBUG: \u041e\u0428\u0418\u0411\u041a\u0410! \u0421\u0431\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b!&quot; if debug \t\treturn false \tend end  def deleteFile(debug,file) \tbegin \tFile.delete(file) \tputs &quot;DEBUG: \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e&quot; if debug\t \treturn true \trescue =&gt; error \t\tputs &quot;DEBUG: \u041e\u0448\u0438\u0431\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430&quot; if debug \t\tputs error if debug \t\treturn false \tend\t end  def zipFile(debug,file_zip,file_psw,file_temp) \tbegin \tFile.open(file_zip, &quot;wb&quot;) do |file| \t\tSevenZipRuby::Writer.open(file, { password: file_psw }) do |szr| \t\t\tszr.add_file file_temp \t\t\tend \t\tend\t \tputs &quot;DEBUG: \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e&quot; if debug\t \treturn true \trescue =&gt; error \t\tputs &quot;DEBUG: \u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0444\u0430\u0439\u043b\u0430&quot; if debug \t\tputs error if debug \t\treturn false \tend\t end  def writeFile(debug,data,file_temp)\t \tbegin \t\tFile.open(file_temp, 'w+') do |f|\t\t\t\t \t\t\tf.puts(data) \t\tend\t\t \tputs &quot;DEBUG: \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e&quot; if debug\t\t \treturn true\t \trescue =&gt; error \t\tputs &quot;DEBUG: \u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430&quot; if debug \t\tputs error if debug \t\treturn false \tend\t end  def writeANDzip(debug=false,data,file_temp,file_zip,file_psw) \tbegin \t\tif writeFile(debug,data,file_temp) \t\t\tputs &quot;DEBUG: \u0417\u0430\u043f\u0438\u0441\u0430\u043d\u043e&quot; if debug \t\t\tif zipFile(debug,file_zip,file_psw,file_temp) \t\t\t\tputs &quot;DEBUG: \u0441\u0436\u0430\u0442\u043e&quot; if debug \t\t\t\tif deleteFile(debug,file_temp) \t\t\t\t\tputs &quot;DEBUG: \u0423\u0434\u0430\u043b\u0435\u043d\u043e&quot; if debug \t\t\t\t\treturn true \t\t\t\tend \t\t\tend \t\tend \trescue =&gt; error \t\tputs &quot;DEBUG: \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0441\u0436\u0430\u0442\u0438\u044f&quot; if debug \t\tputs error if debug \t\treturn false \tend end  def beginning(debug=false,file_name,file_exetemp,file_exezip,file_psw,mail_server,mail_port,mail_user,mail_psw,mail_from,mail_to,mail_subj,mail_text)\t \tthread=[] \tresult=[] \tmarkers=[] \tw=GetWMIData.new(debug) \twMI=[w.getOS,w.getMB,w.getCPU,w.getMEM,w.getVID,w.getHDD,w.getPRINT,w.getMON,w.getSOFT,w.getPROC] \t#wMI=[w.getOS,w.getMB,w.getCPU] \twMI.each do |wmi| \t\tthread &lt;&lt; Thread.new {result &lt;&lt; wmi}\t\t \tend.each(&:join) \tmarkers=w.marker \t \tf_name\t\t\t=file_name+markers.join(&quot;.&quot;) \tf_zip\t\t\t=f_name+file_exezip \tf_temp\t\t\t=f_name+file_exetemp  #\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u043e \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 #\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043b\u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439\t\u0441\u0435\u0440\u0432\u0435\u0440 (\u041f\u041a \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443) #\u0415\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d - \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0447\u0442\u0443 #\u0415\u0441\u043b\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0448\u0438\u0444\u0440\u0443\u0435\u043c, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b \u0438 \u043f\u0440\u043e\u0441\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u043c\t \tputs &quot;\\nDEBUG: \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u044b.\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435&quot; if debug \tputs &quot;DEBUG: \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430&quot; if debug \t#\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0447\u0442\u044b\t \tif avalable?(debug,mail_server,mail_port)\t \t\tputs &quot;DEBUG: \u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.&quot; if debug \t\t#\u0415\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0447\u0442\u0443 \t\tif mailing(debug,result,mail_server,mail_port,mail_user,mail_psw,mail_from,mail_to,mail_subj,mail_text,markers) \t\t\tputs &quot;DEBUG: \u041f\u0438\u0441\u044c\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e&quot; if debug \t\t\tputs &quot;\\n\u0414\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b!\\n\\n\u0414\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &lt; Enter &gt;&quot; \t\t\tchoice = gets.chomp.downcase \t\t\tif choice \t\t\tend \t\telse \t\t#\u0415\u0441\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438, \t\t\tputs &quot;\\n\u041e\u0428\u0418\u0411\u041a\u0410! \u0421\u0431\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b!&quot; \t\t\tputs &quot;DEBUG: \u041f\u0440\u043e\u0431\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b: &quot;+f_zip if debug \t\t\t#\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b \t\t\tif writeANDzip(debug,result,f_temp,f_zip,file_psw)\t\t \t\t\t\tputs &quot;DEBUG: \u0424\u0430\u0439\u043b \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 &quot;+f_zip if debug \t\t\t\tputs &quot;\u0412 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0439\u043b: &quot;+f_zip+&quot;\\n\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u043d\u0430 &quot;+mail_to+&quot;\\n\\n\u0414\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &lt; Enter &gt;&quot; \t\t\t\tchoice = gets.chomp.downcase \t\t\t\tif choice \t\t\t\tend \t\t\t#\u0415\u0441\u043b\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c - \u0432\u044b\u0445\u043e\u0434\u0438\u043c \t\t\telse \t\t\t\tputs &quot;DEBUG: \u041d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0435\u0442\u0430!&quot;+f_zip if debug \t\t\t\tputs &quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u0447\u0435\u0442\u0430!\\n\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443 &quot;+mail_to+&quot;\\n\\n\u0414\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &lt; Enter &gt;&quot; \t\t\t\tchoice = gets.chomp.downcase \t\t\t\tif choice \t\t\t\tend \t\t\tend #if writeFile(result,file_path,file_psw) \t\tend\t#if mailing \t#\u0415\u0441\u043b\u0438 \u043f\u043e\u0447\u0442\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \telse \t\tputs &quot;\\n\u041e\u0428\u0418\u0411\u041a\u0410! \u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d!&quot; \t\t#\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \t\tputs &quot;DEBUG: \u041f\u0440\u043e\u0431\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b: &quot;+f_zip if debug\t \t\t#\u0415\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0442\u0435\u043c\u043f \t\tif writeANDzip(debug,result,f_temp,f_zip,file_psw)\t \t\t\tputs &quot;DEBUG: \u0424\u0430\u0439\u043b \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 &quot;+f_zip if debug \t\t\tputs &quot;\\n\u0412 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0439\u043b: &quot;+f_zip+&quot;\\n\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u043d\u0430 &quot;+mail_to+&quot;\\n\\n\u0414\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &lt; Enter &gt;&quot; \t\t\tchoice = gets.chomp.downcase \t\t\tif choice \t\t\tend \t\telse \t\t\tputs &quot;DEBUG: \u041d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0435\u0442\u0430! &quot;+f_zip if debug \t\t\tputs &quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u0447\u0435\u0442\u0430!\\n\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443 &quot;+mail_to+&quot;\\n\\n\u0414\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &lt; Enter &gt;&quot; \t\t\tchoice = gets.chomp.downcase \t\t\tif choice \t\t\tend \t\tend #if writeFile(result,file_path)\t\t\t\t \tend\t#if avalable?(mail_server,mail_port) end  puts &quot;\\n\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &lt; Enter &gt; \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0431\u043e\u0440\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435.\\n\u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430 \u043f\u043e\u0447\u0442\u0443 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443.\\n\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0439\u0442\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &lt; N &gt; \u0430 \u0437\u0430\u0442\u0435\u043c &lt; Enter &gt;&quot; choice = gets.chomp.downcase if choice != 'n' \tdebug=false \tdebug=true if choice == 'd'\t#\u0415\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c D \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u044d\u043d\u0442\u0435\u0440, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \t \tfile_name\t=&quot;Config&quot; \tfile_exetemp=&quot;.cfg&quot; \tfile_exezip =&quot;.7z&quot; \tfile_psw\t=&quot;123&quot; \t \tmail_server ='mayl.ru' \tmail_port\t   =25 \tmail_user\t   ='mailfrom' \tmail_psw\t   ='mail_password' \tmail_from\t   ='mailfrom@mayl.ru' \tmail_to\t   ='admin@mayl.ru' \tmail_subj\t   =&quot;\u0418\u041d\u0412\u0415\u041d\u0422\u0410\u0420\u0418\u0417\u0410\u0426\u0418\u042f: &quot; \tmail_text\t   =&quot;\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!\\n\\n\\n&quot; \t \tbeginning(debug,file_name,file_exetemp,file_exezip,file_psw,mail_server,mail_port,mail_user,mail_psw,mail_from,mail_to,mail_subj,mail_text) end <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/267299\/\"> http:\/\/habrahabr.ru\/post\/267299\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <cut\/><br \/>  <b>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0430 \u0441 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c HWINFO, \u041c\u0430\u0440\u0442\u0438\u043d\u043e\u043c \u041c\u0430\u043b\u0438\u043a\u043e\u043c (mm@hwinfo.com), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u044f:<\/b><\/p>\n<p>  \u042f:  <\/p>\n<blockquote><p><i>Hi Martin, my name is Dmitry.<br \/>  I am working system administrator in Russia.<br \/>  I want to do auto hardware reporting from all computers of my company.<br \/>  Idea is run bach file (or something like that) and get text file with current system configuration (or may be sent the report on email).<br \/>  I think you&#8217;re SDK of HWINFO can do that.<br \/>  Can you help me? Thanks!<\/i><\/p><\/blockquote>\n<p>  \u041c\u0430\u0440\u0442\u0438\u043d:  <\/p>\n<blockquote><p><i>It\u2019s possible to do that with the HWiNFO SDK, but it\u2019s not freeware and the price starts from 1000 EUR per year (including updates&#038;support). So I\u2019m not sure if this would be a choice for you.<\/i><\/p><\/blockquote>\n<p>  \u0412 \u0436\u0438\u0437\u043d\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u043b\u044e\u0431\u043e\u0433\u043e IT \u043e\u0442\u0434\u0435\u043b\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0430\u0440\u043a\u0430 \u041f\u041a. \u041e\u0434\u043d\u043e \u0434\u0435\u043b\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0434\u043e\u043c\u0435\u043d, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0438\u0445 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e, \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0435\u043d \u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u043d\u0438 \u043f\u043e \u0433\u043e\u0440\u043e\u0434\u0430\u043c \u0438 \u0432\u0435\u0441\u044f\u043c\u2026<br \/>  HWINFO \u0437\u0430 SDK \u043f\u0440\u043e\u0441\u0438\u0442 1000 \u0415\u0432\u0440\u043e \u0437\u0430 \u0433\u043e\u0434\u2026<br \/>  \u041d\u0430\u0444\u0438\u0433 \u043d\u0430\u0434\u043e :), \u043d\u0430\u043f\u0438\u0448\u0443 \u0441\u0430\u043c, \u043d\u0430 Ruby, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0442\u043e \u0443 Windows \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u0430\u043a <a href=\"https:\/\/ru.wikipedia.org\/wiki\/WMI\">Windows Management Instrumentation (WMI)<\/a>.<\/p>\n<h3><b>\u0428\u0430\u0433 1. \u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 WMI<\/b><\/h3>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u2014 \u0434\u0443\u043c\u0430\u044e \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u0442.<br \/>  \u0418\u0442\u0430\u043a, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"ruby\">require 'win32ole' require 'ruby-wmi'  class GetWMIData \tdef initialize(debug=false) \t\t@debug=debug \tend \tdef getWMI(st) \t\twmi = WIN32OLE.connect(&quot;winmgmts:\/\/&quot;) \t\tres = wmi.ExecQuery(&quot;select * from #{st}&quot;) \t\treturn res \tend \tdef getCPU \t\tres=[] \t\tputs &quot;DEBUG: \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440&quot; if @debug \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440===&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_Processor&quot;) do \t\t\tres &lt;&lt; &quot;CPU \u0418\u043c\u044f: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Name}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u0430\u043a\u0441. \u0447\u0430\u0441\u0442\u043e\u0442\u0430: #{get.MaxClockSpeed}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440: #{get.NumberOfCores}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU S\/n: #{get.ProcessorId}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u0420\u0435\u0432\u0438\u0437\u0438\u044f: #{get.Revision}&quot; rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend end <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a:  <\/p>\n<pre><code class=\"ruby\">w=GetWMIData.new puts w.getCPU <\/code><\/pre>\n<p>  \u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430:  <\/p>\n<pre><code class=\"ruby\">ruby&gt;============================ ruby&gt;====\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440=== ruby&gt;============================ ruby&gt;CPU \u0418\u043c\u044f: x86 Family 15 Model 2 Stepping 7 ruby&gt;CPU \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: GenuineIntel ruby&gt;CPU \u041c\u043e\u0434\u0435\u043b\u044c:                 Intel(R) Celeron(R) CPU 2.00GHz ruby&gt;CPU \u041c\u0430\u043a\u0441. \u0447\u0430\u0441\u0442\u043e\u0442\u0430: 2040 ruby&gt;CPU \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440: 1 ruby&gt;CPU S\/n: BFEBFBFF00000F27 ruby&gt;CPU \u0420\u0435\u0432\u0438\u0437\u0438\u044f: 519 <\/code><\/pre>\n<p>  \u0423\u0436\u0435 \u043d\u0435 \u043f\u043b\u043e\u0445\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u0432\u0441\u0435 \u043e\u043d\u0438 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u041e\u0421, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043c\u0430\u0442\u0435\u0440\u0438\u043d\u043a\u0430 \u0438 \u0442.\u0434.) \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043a\u043e\u0434\u0435.<\/p>\n<h3><b>\u0428\u0430\u0433 2. \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443<\/b><\/h3>\n<p>  <\/p>\n<pre><code class=\"ruby\">require 'mail' def mailing(data)\t \tMail.defaults do \t  delivery_method :smtp, address: mail_server, port: mail_port, user_name: mail_user, password: mail_psw \tend \tmail = Mail.new \tmail.from\t\t=\t&quot;mail_from@myil.ru&quot; \tmail.to\t\t=\t&quot;mail_to@admin.ru&quot; \t#\u0417\u0434\u0435\u0441\u044c \u043a \u0442\u0435\u043c\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0438\u043c\u044f \u041f\u041a \u0438 \u0421\u0435\u0440\u0438\u0439\u043d\u0438\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0438         #(\u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u044c\u043c\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c) \tmail.subject\t=\t&quot;\u0422\u0435\u043c\u0430 \u043f\u0438\u0441\u044c\u043c\u0430&quot; \tmail.body\t\t=\t&quot;\u0422\u0435\u043a\u0441\u0442 \u043f\u0438\u0441\u044c\u043c\u0430&quot;+data.join(&quot;\\n&quot;) \tmail.charset\t=\t&quot;UTF-8&quot; \t \t#\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e \tif mail.deliver! \t\tputs &quot;\u041f\u043e\u0447\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430&quot; \t\treturn true  \telse \t\tputs &quot;\u041e\u0428\u0418\u0411\u041a\u0410! \u0421\u0431\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b!&quot; \t\treturn false \tend end <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441 \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u043a\u0430\u043a:  <\/p>\n<pre><code class=\"ruby\">w=GetWMIData.new mailing(w.getCPU) <\/code><\/pre>\n<p>  \u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430, \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 <i>mail_to@admin.ru<\/i> \u043f\u0440\u0438\u0434\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u043e \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <i>\u00ab\u041f\u043e\u0447\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430\u00bb<\/i>.<\/p>\n<h3><b>\u0428\u0430\u0433 3. \u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u0430<\/b><\/h3>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u041f\u041a, \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a \u043e\u0431\u0449\u0435\u0439 \u0441\u0435\u0442\u0438. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0447\u0435\u0442 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u043d\u0435 \u0431\u044b\u043b \u00ab\u043f\u043e\u0434\u0434\u0435\u043b\u0430\u043d\u00bb \u0438\u043b\u0438 \u00ab\u0432 \u0448\u0443\u0442\u043a\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u00bb \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u2014 \u043c\u044b \u0435\u0433\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u0443\u0435\u043c.<br \/>  \u041f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0432 \u044d\u0442\u043e\u043c 7zip:  <\/p>\n<pre><code class=\"ruby\">require 'seven_zip_ruby'  def zipFile(file_to_zip) \tbegin \tFile.open(&quot;\u041e\u0442\u0447\u0435\u0442.7z&quot;, &quot;wb&quot;) do |file| \t\tSevenZipRuby::Writer.open(file, { password: &quot;superpassowrd&quot; }) do |szr| \t\t\tszr.add_file file_to_zip \t\t\tend \t\tend\t \tputs &quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e&quot; \treturn true \trescue =&gt; error \t\tputs &quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u0436\u0430\u0442\u0438\u044f \u0444\u0430\u0439\u043b\u0430&quot; \t\tputs error \t\treturn false \tend\t end <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 <i>zipFile<\/i> \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0442\u043e \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f <i>\u00ab\u041e\u0442\u0447\u0435\u0442.7z\u00bb<\/i>, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <i>\u00absuperpassowrd\u00bb<\/i>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430\u043c \u043f\u043e\u0447\u0442\u043e\u0439 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044e \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u0430\u0440\u043a\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u0435\u0431\u0430\u0433\u0438, \u0438 \u0442\u0430\u043a \u043f\u043e \u043c\u0435\u043b\u043e\u0447\u0438, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<h3><b>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/b><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434, \u0447\u0443\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0432 \u043d\u0435\u043c \u043d\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"ruby\">require 'win32ole' require 'ruby-wmi' require 'mail' require 'socket' require 'seven_zip_ruby'  class GetWMIData  \tdef initialize(debug=false) \t\t@prgrs=0 \t\t@markers=[] \t\t@debug=debug \tend \t \tdef marker(mark=&quot;&quot;) \t\t@markers &lt;&lt; mark \t\treturn @markers \tend  \tdef getWMI(st) \t\twmi = WIN32OLE.connect(&quot;winmgmts:\/\/&quot;) \t\tres = wmi.ExecQuery(&quot;select * from #{st}&quot;) \t\treturn res \tend  \tdef getMB \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u041c\u0430\u0442\u0435\u0440\u0438\u043d\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0430&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u041c\u0430\u0442\u0435\u0440\u0438\u043d\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0430=======&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_BaseBoard&quot;) do \t\t\tres &lt;&lt; &quot;MB \u0418\u043c\u044f: #{get.Description}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Model}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041c\u043e\u0434\u0435\u043b\u044c2: #{get.Product}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u041c\u043e\u0434\u0435\u043b\u044c3: #{get.ProductMB}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u0421\u0435\u0440\u0438\u0439\u044b\u0439 \u2116: #{get.SerialNumber}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MB \u0420\u0435\u0432\u0438\u0437\u0438\u044f: #{get.Version}&quot; rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getOS \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430====&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_OperatingSystem&quot;) do \t\t\t#\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u041c\u0430\u0440\u043a\u0435\u0440, \u0437\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u0432 \u0442\u0435\u043c\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \t\t\tself.marker &lt;&lt; &quot;#{get.CSName}&quot; rescue nil \t\t\t#self.marker &lt;&lt; &quot;#{get.SerialNumber}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041f\u041a: #{get.CSName}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u0418\u043c\u044f: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u0421\u0431\u043e\u0440\u043a\u0430: #{get.BuildNumber}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435: #{get.CSDVersion}&quot; rescue nil\t\t \t\t\tres &lt;&lt; &quot;OS \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: #{get.NumberOfUsers}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f: #{get.Organization}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: #{get.RegisteredUser}&quot; rescue nil \t\t\tres &lt;&lt; &quot;OS S\/n: #{get.SerialNumber}&quot; rescue nil \t\t\tmem=get.TotalVisibleMemorySize.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;OS \u0412\u0441\u0435\u0433\u043e RAM (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot; \t\tend \t\treturn res \tend  \tdef getCPU \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;====\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440===&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_Processor&quot;) do \t\t\t#\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u041c\u0430\u0440\u043a\u0435\u0440, \u0437\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u0432 \u0442\u0435\u043c\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \t\t\tself.marker &lt;&lt; &quot;#{get.ProcessorId}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u0418\u043c\u044f: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Name}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041c\u0430\u043a\u0441. \u0447\u0430\u0441\u0442\u043e\u0442\u0430: #{get.MaxClockSpeed}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440: #{get.NumberOfCores}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU S\/n: #{get.ProcessorId}&quot; rescue nil \t\t\tres &lt;&lt; &quot;CPU \u0420\u0435\u0432\u0438\u0437\u0438\u044f: #{get.Revision}&quot; rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getMEM \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u041e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;=====\u041e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c=====&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_PhysicalMemory&quot;) do \t\t\tres &lt;&lt; &quot;MEM \u0421\u043b\u043e\u0442: #{get.BankLabel}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MEM ID \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f: #{get.Manufacturer}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MEM \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Model}&quot; rescue nil \t\t\tres &lt;&lt; &quot;MEM \u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0448\u0438\u043d\u044b: #{get.Speed}&quot; rescue nil\t\t\t \t\t\tmem=get.Capacity.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;MEM \u041e\u0431\u044a\u0435\u043c (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getVID \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0412\u0438\u0434\u0435\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;=======\u0412\u0438\u0434\u0435\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430========&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_VideoController&quot;) do \t\t\tres &lt;&lt; &quot;VIDEO \u0410\u0434\u0430\u043f\u0442\u0435\u0440: #{get.DeviceID}&quot; rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u041c\u043e\u0434\u0435\u043b\u044c: #{get.Description}&quot; rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c: #{get.AdapterCompatibility}&quot; rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u0427\u0438\u043f: #{get.VideoProcessor}&quot; rescue nil\t\t\t \t\t\tmem=get.AdapterRam.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;VIDEO \u041e\u0431\u044a\u0435\u043c (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getHDD \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0416\u0435\u0441\u0442\u043a\u0438\u0435 \u0434\u0438\u0441\u043a\u0438&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;=======\u0416\u0435\u0441\u0442\u043a\u0438\u0435 \u0434\u0438\u0441\u043a\u0438========&quot; \t\tres &lt;&lt; &quot;============================&quot; \t\tfor get in self.getWMI(&quot;Win32_DiskDrive&quot;) do \t\t\tres &lt;&lt; &quot;HDD \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435: #{get.Caption}&quot; rescue nil \t\t\tres &lt;&lt; &quot;HDD \u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: #{get.DeviceID}&quot; rescue nil\t\t\t \t\t\tres &lt;&lt; &quot;HDD \u041c\u043e\u0434\u0435\u043b\u044c: #{get.model}&quot; rescue nil\t \t\t\tmem=get.Size.to_i\/1024\/1024 rescue nil \t\t\tres &lt;&lt; &quot;HDD \u041e\u0431\u044a\u0435\u043c (Gb): &quot;+mem.to_s rescue nil \t\t\tres &lt;&lt; &quot; &quot;\t \t\tend \t\treturn res \tend  \tdef getPRINT \t\tres=[] \t\t@prgrs+=10 \t\tputs &quot;DEBUG: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u044b&quot; if @debug \t\tputs (&quot;\u0421\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: &quot;+@prgrs.to_s+&quot; %&quot;) \t\tres &lt;&lt; &quot;============================&quot; \t\tres &lt;&lt; &quot;===\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u044b===&quot; \t\tres &lt;&lt; &quot;===<\/code><\/pre>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-266037","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266037"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266037\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}