<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; WSH: определение даты установки операционной системы]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=9</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=9&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «WSH: определение даты установки операционной системы».]]></description>
		<lastBuildDate>Sun, 10 Nov 2013 16:01:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: WSH: определение даты установки операционной системы]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=77125#p77125</link>
			<description><![CDATA[<div class="codebox"><pre><code>...
new Date(raw * 1000)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Sun, 10 Nov 2013 16:01:29 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=77125#p77125</guid>
		</item>
		<item>
			<title><![CDATA[Re: WSH: определение даты установки операционной системы]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=77118#p77118</link>
			<description><![CDATA[<p>Альтернативный вариант:<br /></p><div class="codebox"><pre><code>with (new ActiveXObject(&#039;WScript.Shell&#039;)) {
  var raw = RegRead(&#039;HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\InstallDate&#039;);
  with (new Date(1970, 0, 1)) {
    WScript.echo(new Date(setSeconds(getSeconds() + raw)));
  }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (greg zakharov)]]></author>
			<pubDate>Sun, 10 Nov 2013 09:04:47 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=77118#p77118</guid>
		</item>
		<item>
			<title><![CDATA[WSH: определение даты установки операционной системы]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=19#p19</link>
			<description><![CDATA[<div class="codebox"><pre><code>Set dtmConvertedDate = CreateObject(&quot;WbemScripting.SWbemDateTime&quot;)
strComputer = &quot;CompName&quot;
Set objWMIService = GetObject(&quot;winmgmts:&quot; _
    &amp; &quot;{impersonationLevel=impersonate}!\\&quot; &amp; strComputer &amp; &quot;\root\cimv2&quot;)
Set colOperatingSystems = objWMIService.ExecQuery _
    (&quot;Select * from Win32_OperatingSystem&quot;)
For Each objOperatingSystem in colOperatingSystems
    dtmConvertedDate.Value = objOperatingSystem.InstallDate 
    dtmInstallDate = dtmConvertedDate.GetVarDate
    Wscript.Echo &quot;Install Date: &quot; &amp; dtmInstallDate
Next</code></pre></div><p>Данный скрипт можно считать дополнением к статье <a href="http://www.script-coding.com/WMI_SoftWare.html">Рецепты WMI: сбор сведений о конфигурации операционной системы и установленном программном обеспечении</a>. Объект &quot;WbemScripting.SWbemDateTime&quot; применяется для приведения даты в удобочитаемый вид.<br />P.S. Скрипт прислал <strong>MoonRabbit</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Fri, 07 Jul 2006 15:25:53 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=19#p19</guid>
		</item>
	</channel>
</rss>
