{"id":1339,"date":"2014-07-04T05:27:59","date_gmt":"2014-07-04T10:27:59","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=1339"},"modified":"2014-07-04T05:29:32","modified_gmt":"2014-07-04T10:29:32","slug":"script-to-determine-the-operating-system-installation-date","status":"publish","type":"post","link":"https:\/\/www.wildow.com\/blog\/?p=1339","title":{"rendered":"Script to determine the Operating System installation date"},"content":{"rendered":"<p><a href=\"http:\/\/windowsxp.mvps.org\/getosdate.htm\" target=\"_blank\">http:\/\/windowsxp.mvps.org\/getosdate.htm<\/a><\/p>\n<p>To run the script, copy the following lines to a Notepad document, and save as a file with .VBS extension (use double-quotes) and double-click the file. The installation date and time would be displayed.<\/p>\n<div id=\"example\">\n<p><span style=\"color: #008080;\">&#8216; \u00a9 2006 Ramesh Srinivasan.<br \/>\n&#8216;Returns the Operating System installation date.<\/span><br \/>\nstrComputer = &#8220;.&#8221;<br \/>\nSet dtmInstallDate = CreateObject( _<br \/>\n&#8220;WbemScripting.SWbemDateTime&#8221;)<br \/>\nSet objWMIService = GetObject(&#8220;winmgmts:&#8221; _<br \/>\n&amp; &#8220;{impersonationLevel=impersonate}!\\\\&#8221; _<br \/>\n&amp; strComputer &amp; &#8220;\\root\\cimv2&#8221;)<br \/>\nSet colOperatingSystems = objWMIService.ExecQuery _<br \/>\n(&#8220;Select * from Win32_OperatingSystem&#8221;)<br \/>\nFor Each objOperatingSystem in colOperatingSystems<br \/>\nMsgBox &#8220;Install Date: &#8221; &amp; getmydat (objOperatingSystem.InstallDate)<br \/>\nNext<\/p>\n<p>Function getmydat(wmitime)<br \/>\ndtmInstallDate.Value = wmitime<br \/>\ngetmydat = dtmInstallDate.GetVarDate<br \/>\nEnd function<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/windowsxp.mvps.org\/getosdate.htm To run the script, copy the following lines to a Notepad document, and save as a file with .VBS extension (use double-quotes) and double-click the file. The installation date and time would be displayed. &#8216; \u00a9 2006 Ramesh Srinivasan. &#8230; <a class=\"more-link\" href=\"https:\/\/www.wildow.com\/blog\/?p=1339\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1339","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1339"}],"version-history":[{"count":2,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1339\/revisions"}],"predecessor-version":[{"id":1341,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1339\/revisions\/1341"}],"wp:attachment":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}