<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title></title>
		<description>Buzzed up engineering and more!</description>
		<link>https://www.gregorystrike.com/</link>
		<atom:link href="https://www.gregorystrike.com/feed.xml" rel="self" type="application/rss+xml" />
		
			<item>
				<title>KCS Mix Tape Kits Now Available!</title>
				<description>&lt;p&gt;&lt;img src=&quot;/assets/KCS_Board_Transparent_300px.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Get your own KCS Mix Tape &lt;b&gt;&lt;a href=&quot;https://store.thecurious.place/&quot;&gt;here&lt;/a&gt;&lt;/b&gt;!&lt;/p&gt;
</description>
				<pubDate>Sun, 08 Jan 2023 13:00:00 -0500</pubDate>
				<link>https://www.gregorystrike.com/2023/01/08/kcs-mix-tape/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2023/01/08/kcs-mix-tape/</guid>
			</item>
		
			<item>
				<title>Kansas City Standard (Cassette Tape) Decoder for the 6502 Computer</title>
				<description>&lt;p&gt;This is part of a multipart series where we’ll be modifying a homebuilt 6502 processor computer in strange and creative ways.&lt;/p&gt;

&lt;p&gt;In this part of the series we’ll be building a circuit to demodulate (or decode) Kansas City Standard audio and load that onto our 6502 computer.&lt;/p&gt;

&lt;p&gt;Kansas City Standard or BYTE Standard, was a standard developed by BYTE magazine back in in the late 70’s. It was used to store computer data on standard, low-cost, audio cassette tapes. It was designed to allow common people to be able store data at home as there weren’t many options to do so back around that time. There were even radio shows where they would broadcast out Kansas City Standard formatted audio and nerds like you and I would tune in to, listen to the broadcast and record the last part of the show to “download” a new computer program!&lt;/p&gt;

&lt;p&gt;At the conclusion of this KCS build, we’ll be able to load our Ben Eater 6502 from tape!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/assets/Circuit_Full.jpg&quot;&gt;&lt;img class=&quot;alignleft size-medium wp-image-1549&quot; src=&quot;/assets/Circuit_Full.jpg&quot; alt=&quot;Mr Monostable looking to the nines!&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Part 1:&lt;/b&gt;&lt;br /&gt;
We’ll go through the history of the Kansas City Standard, some deep level details, and then an overview/theory of how the circuit works.  At the end of this video, we’ll have a demodulated UART stream ready to feed into the logic part of the circuit.
&lt;br /&gt;
&lt;br /&gt;
We’ll also be introduced to Mr. Monostable, a refined gentleman with a short temper.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/6m7vDhscGzU&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;br /&gt;
If you’re interested in a kit to perform this build yourself.  I’ll put one together if there’s enough community interest. (Update: &lt;a href=&quot;https://store.thecurious.place/&quot;&gt;I did&lt;/a&gt;!
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Part 2:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/ei_JZlPCJcM&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;In this video we latching (or holdon to) the data coming in and we FINALLY get to see some Kansas City Standard data being decoded!&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Part 3:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/8Gw-JDOg_2I&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;In this video we take the next step in our project and can finally load data from the KCS circuit!  We do this by adding an additional W65C22, adding some hardware to handle more interrupts, and update some code.&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Part 4:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/viUyY7hbHyY&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;Here we build the bootloader for the 6502 in assembly and successfully launch a program that is stored on tape!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;IT’S HERE!:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/GdgB5owro6o&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;Introducing the KCS Mix Tape: A DIY Electronics Kit.  This video covers the new kit as well as tuning.  Enjoy!&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;The KCS Mix Tape can be purchased &lt;a href=&quot;https://store.thecurious.place/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I’ve published any code and the schematic for these videos on &lt;a href=&quot;https://github.com/gstrike/CuriousPlace&quot;&gt;my GitHub&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;alignleft size-medium wp-image-1549&quot; src=&quot;/assets/MrMonostable.jpg&quot; alt=&quot;Mr Monostable looking to the nines!&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;
…he’s watching.&lt;/p&gt;
</description>
				<pubDate>Sat, 07 Jan 2023 13:00:00 -0500</pubDate>
				<link>https://www.gregorystrike.com/2023/01/07/kansas-city-standard-decoder/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2023/01/07/kansas-city-standard-decoder/</guid>
			</item>
		
			<item>
				<title>EdgeRouter w/ Gigabit Internet Slow Fixed!</title>
				<description>&lt;p&gt;I recently upgraded my home Internet from Spectrum Ultra (500/20) to TDS Fiber Gigabit (1000/1000).  However, when running speed tests on the new circuit I noticed that I was consistently getting speeds SLOWER than my Spectrum Circuit.  I was getting around 250-300mbps.&lt;/p&gt;

&lt;p&gt;This ended up being a configuration issue with my Ubiquiti EdgeRouter PRO-8, which is definitely capable of delivering gigabit speeds!&lt;/p&gt;

&lt;p&gt;The very first things I checked, were to ensure I was running the latest code (v2.0.9-hotfix.5 at this time) and that hardware offloading was ENABLED:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ configure
#set system offload hwnat disable
#set system offload ipsec enable
#set system offload ipv4 bonding enable
#set system offload ipv4 disable-flow-flushing-upon-fib-changes
#set system offload ipv4 forwarding enable
#set system offload ipv4 gre enable
#set system offload ipv4 pppoe enable
#set system offload ipv4 table-size 65536
#set system offload ipv4 vlan enable
#set system offload ipv6 bonding enable
#set system offload ipv6 forwarding enable
#set system offload ipv6 pppoe disable
#set system offload ipv6 table-size 65536
#set system offload ipv6 vlan enable
#commit&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I was still seeing the issue, still had slow speeds.  But, I also noticed in the GUI that when I was running my speed tests the CPU was maxing out at 100%.  I jumped down to the CLI and ran “top”, to see what was pegging the CPU.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/assets/2023-01-04-EdgeRouter-Gigabit-Internet-Slow_top.png&quot;&gt;&lt;img class=&quot;alignleft size-medium wp-image-1549&quot; src=&quot;/assets/2023-01-04-EdgeRouter-Gigabit-Internet-Slow_top.png&quot; alt=&quot;top running on the EdgeRouter ER-8 Pro&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;The ksoftirqd process was pegging the CPU on the EdgeRouter.  This lead me to &lt;a href=&quot;https://community.ui.com/questions/Edgerouter-Infinity-Periodic-High-CPU-High-Ping-Bandwidth-Drops-from-ksoftirqd-/50bb1acd-8fdf-4131-beb3-f1d3bd5d4943&quot;&gt;this&lt;/a&gt; post, which reminded me that I had played with Netflow a few years back.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ $ configure
[edit]
# delete system flow-accounting
[edit]
# commit
[ system flow-accounting ]
Removing flow-accounting NFLOG for [eth7][ingress][post-dnat]
Removing flow-accounting NFLOG for [eth7][egress]
Stopping flow-accounting daemon [ingress]
Stopping flow-accounting daemon [egress]

[edit]
$ configure
[edit]
# save
Saving configuration to &apos;/config/config.boot&apos;...
Done
[edit]
# exit&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;After disabling flow accounting, this fixed it and I was getting really close to my Gigabit speeds!&lt;/p&gt;
</description>
				<pubDate>Wed, 04 Jan 2023 13:00:00 -0500</pubDate>
				<link>https://www.gregorystrike.com/2023/01/04/edgerouter-gigabit-internet-slow/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2023/01/04/edgerouter-gigabit-internet-slow/</guid>
			</item>
		
			<item>
				<title>Mutiple Ways to Reboot CradlePoint Devices [SSH, WGET, CURL, SMS, HTML (POST)]</title>
				<description>&lt;p&gt;Here are a couple ways I’ve come up with to reboot CradlePoint devices remotely. These were all tested on MBR1400 routers using v6.0.2 firmware. If you have proper HTTPS certificates installed for the web interface you can drop the ‘–no-check-certificate’ or the ‘–insecure’ options on the WGET and CURL commands. Also note that the CURL and WGET commands are using the password in the command. This can be insecure for many reasons.&lt;/p&gt;

&lt;p&gt;Of course, you could always use the web interface too.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Using SSH:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;ssh &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;user]@[ip address] &lt;span class=&quot;s1&quot;&gt;&apos;reboot&apos;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;b&gt;Using WGET:&lt;/b&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;wget &lt;span class=&quot;nt&quot;&gt;--no-check-certificate&lt;/span&gt; https://[ip address]/api/control/system/reboot &lt;span class=&quot;nt&quot;&gt;--http-user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=[&lt;/span&gt;user] &lt;span class=&quot;nt&quot;&gt;--http-password&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=[&lt;/span&gt;password] &lt;span class=&quot;nt&quot;&gt;--post-data&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;data=%221%22&apos;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;b&gt;Using CURL:&lt;/b&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;curl &lt;span class=&quot;nt&quot;&gt;--insecure&lt;/span&gt; https://[ip address]/api/control/system/reboot &lt;span class=&quot;nt&quot;&gt;--anyauth&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;user]:[password] &lt;span class=&quot;nt&quot;&gt;--data&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;data=%221%22&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;b&gt;Custom HTML using POST:&lt;/b&gt;&lt;br /&gt;
You can throw this code into a custom website, if you really feel the need.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot; data-lang=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;form&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;action=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://[ip address]/api/control/system/reboot&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;method=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
     &lt;span class=&quot;nt&quot;&gt;&amp;lt;button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;submit&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;data&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Reboot CradlePoint&lt;span class=&quot;nt&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;b&gt;Using SMS:&lt;/b&gt;&lt;br /&gt;
You can also use SMS to send a text message to the CradlePoint router instructing it to reboot.  Unless you’ve changed the SMS password, the SMS password is the last eight characters of the MAC address.  It’s specifically an SMS password (so it’s not tied to any user account).&lt;/p&gt;

&lt;p&gt;The format of the text message:&lt;br /&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;password],reboot&amp;lt;br /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You’ll receive a text back from the device:&lt;br /&gt;
&lt;a href=&quot;/assets/legacy/CP-Reboot.png&quot; rel=&quot;attachment wp-att-1549&quot;&gt;&lt;img class=&quot;alignleft size-medium wp-image-1549&quot; src=&quot;/assets/legacy/CP-Reboot.png&quot; alt=&quot;CP Reboot&quot; width=&quot;300&quot; height=&quot;149&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 11 Jan 2016 12:35:14 -0500</pubDate>
				<link>https://www.gregorystrike.com/2016/01/11/mutiple-ways-to-reboot-cradlepoint-devices/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2016/01/11/mutiple-ways-to-reboot-cradlepoint-devices/</guid>
			</item>
		
			<item>
				<title>How to Search Active Directory by 'objectSid' using PowerShell</title>
				<description>&lt;p&gt;Sometimes you may have a SID (objectSid) for an Active Directory object but not necessarily know which object it belongs to.  You can find the object using PowerShell.&lt;/p&gt;

&lt;p&gt;I came across this when recovering a hard drive for a company.  The hard drive was from a domain computer and the NTFS permissions only showed the SID as the recovery computer was a workgroup computer and didn’t have access to the domain.  I wanted to re-apply the NTFS permissions on the replaced drive so I needed to know which each SID belonged to.&lt;/p&gt;

&lt;p&gt;Run the following on a computer that is a member of the domain:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;n&quot;&gt;Import-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ActiveDirectory&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-ADUser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Identity&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;S-1-5-21-941005169-1824062477-405670111-1106&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</description>
				<pubDate>Thu, 30 Jan 2014 13:37:42 -0500</pubDate>
				<link>https://www.gregorystrike.com/2014/01/30/how-to-search-active-directory-by-objectsid-using-powershell/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2014/01/30/how-to-search-active-directory-by-objectsid-using-powershell/</guid>
			</item>
		
			<item>
				<title>Streaming Google Music with MPD</title>
				<description>&lt;p&gt;I’ve been thinking about building a plugin for &lt;a href=&quot;https://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki&quot;&gt;MPD&lt;/a&gt; that would allow it to talk with &lt;a href=&quot;https://music.google.com&quot;&gt;Google Music&lt;/a&gt; for a while now.  Currently, when I purchase music from Google Music, I have to download it and push the new music up to my local music share on my network.  Once my music is there, MPD can stream it without a problem…  I love MPD!&lt;/p&gt;

&lt;p&gt;I started to investigate the idea this weekend.  I found these two projects that I wanted to share with you guys.  They helped me prove out that the plugin I want to write is possible without TOO much work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/simon-weber/Unofficial-Google-Music-API&quot; title=&quot;Unofficial Google Music API&quot;&gt;Unofficial Google Music API&lt;/a&gt;&lt;/strong&gt; - An unofficial, opensource API written in Python for Google Music.&lt;br /&gt;
&lt;strong&gt;&lt;a href=&quot;https://sourceforge.net/projects/musicpd/files/mpc/0.22/&quot;&gt;MPC&lt;/a&gt;&lt;/strong&gt; - A linux terminal based MPD client.&lt;/p&gt;

&lt;p&gt;First, by modifying the example.py in the Google Music API a little I was able to create a script that would sign into Google Music, find the first song in my library and grab the streaming URL of that song.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#!/usr/bin/env python
# -*- coding: utf-8 -*-
&lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;getpass&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;getpass&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gmusicapi&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Api&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;ask_for_credentials&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Make an instance of the api and attempts to login with it.
    Return the authenticated api.
    &lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;api&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Api&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;logged_in&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;attempts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logged_in&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;attempts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;email&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;raw_input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Email: &lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;password&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getpass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;logged_in&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;login&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;password&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;attempts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;demonstration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Demonstrate some api features.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;api&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;ask_for_credentials&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;is_authenticated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Sorry, those credentials weren&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;t accepted.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Successfully logged in.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#Get all of the users songs.
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;#library is a big list of dictionaries, each of which contains a single song.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Loading library...&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;library&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get_all_songs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;done.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;tracks detected.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#Show some info about a song. There is no guaranteed order;
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;# this is essentially a random song.
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;first_song&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;The first song I see is &lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;{}&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; by &lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;{}&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;first_song&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;first_song&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;artist&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#We&apos;re going to create a new playlist and add a song to it.
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;#Songs are uniquely identified by &apos;song ids&apos;, so let&apos;s get the id:
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;song_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;first_song&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;nf&quot;&gt;print &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get_stream_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;song_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#It&apos;s good practice to logout when finished.
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;logout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;All done!&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;__main__&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;nf&quot;&gt;demonstration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;When running the script above, it’ll ask for a Google account and password.  Once they are entered the script will login and load the library of the account.  It will grab the first song in the library and output the URL to stream the song.  Now that I had the streaming URL, I needed a way to add that to my MPD queue.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;mpc clear
mpc add &lt;span class=&quot;s2&quot;&gt;&quot;URL FROM SCRIPT ABOVE&quot;&lt;/span&gt;
mpc play&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Low and behold!  When I hit play the song started playing!  So now we know that it can work the next step is figuring out if there’s a way to tie the Google Music library in with MPD’s library.&lt;/p&gt;

</description>
				<pubDate>Sat, 02 Mar 2013 14:38:35 -0500</pubDate>
				<link>https://www.gregorystrike.com/2013/03/02/streaming-google-music-with-mpd/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2013/03/02/streaming-google-music-with-mpd/</guid>
			</item>
		
			<item>
				<title>Configure NetBIOS over TCP/IP with Group Policy</title>
				<description>&lt;p&gt;I came across a situation last week where I needed to finally disable NetBIOS over TCP/IP. While looking for a way to disable it, unfortunately, I found that there really isn’t a good clean way to do so using Group Policy. At least, if there was a good way, I couldn’t find it.&lt;/p&gt;

&lt;p&gt;What I came up with was a VBScript that disables NetBIOS over TCP/IP for every NIC in a computer. The script can be easily modified to enable NetBIOS over TCP/IP as well. I’m currently using this as a Computer Startup Script. Once the script is run, the effects should take place on the next reboot.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/assets/legacy/NetBIOS.png&quot;&gt;&lt;img class=&quot;aligncenter size-medium wp-image-1506&quot; alt=&quot;A screenshot of the settings the script modifies.&quot; src=&quot;/assets/legacy/NetBIOS.png&quot; width=&quot;251&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The screenshot above shows you the settings we’re modifying. Use this as a reference so you know which line to uncomment in the script.  By default I have the script set to 2 - Disable NetBIOS over TCP/IP.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-vb.net&quot; data-lang=&quot;vb.net&quot;&gt;&apos;  Title:      Configure NetBIOS over TCP/IP
&apos;   Date:      2/25/2013
&apos;Updated:
&apos; Author:      Gregory Strike
&apos;    URL:      //www.gregorystrike.com/2013/02/25/configure-netbios-over-tcpip-group-policy.html
&apos;
&apos;Purpose:      The following script will itterate through all NICs on a computer
&apos;              to configuure NetBIOS over TCP/IP.  It finds the NICs listed under:
&apos;              HKLM\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces
&apos;
&apos;              For each NIC under the key, it sets the NetbiosOptions value to one
&apos;              of the below.  (Be sure to uncomment the setting you desire.)
&apos;
&apos;              0 - Default: Use DHCP setting from the DHCP Server
&apos;              1 - Enable NetBIOS over TCP/IP
&apos;              2 - Disable NetBIOS over TCP/IP
&apos;
&apos;Requirements: Administrative Privileges
const HKEY_LOCAL_MACHINE = &amp;amp;H80000002
strComputer = &quot;.&quot;
Set ObjWMI = GetObject(&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot; &amp;amp; strComputer &amp;amp; &quot;\root\default:StdRegProv&quot;)
&apos;Set the path to the Network Interfaces
strKeyPath = &quot;SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces&quot;
&apos;Get all the known interfaces
ObjWMI.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
&apos;If there was a problem getting strKeyPath, exit the script before throwing an error.
If IsNull(arrSubKeys) Then WScript.Quit
WScript.Echo Now() &amp;amp; &quot; - Searching for Network Adapaters.&quot;
&apos;Loop through all Network Interface Cards and disable NetBIOS over TCP/IP
For Each Adapter In arrSubKeys
	WScript.Echo Now() &amp;amp; &quot; - Disabling NetBIOS over TCP/IP on &apos;&quot; &amp;amp; Adapter &amp;amp; &quot;&apos;&quot;
	&apos;Default: Use DHCP setting from the DHCP Server
	&apos;objWMI.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath &amp;amp; &quot;\&quot; &amp;amp; Adapter, &quot;NetbiosOptions&quot;, 0
	&apos;Enable NetBIOS over TCP/IP
	&apos;objWMI.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath &amp;amp; &quot;\&quot; &amp;amp; Adapter, &quot;NetbiosOptions&quot;, 1
	&apos;Disable NetBIOS over TCP/IP
	objWMI.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath &amp;amp; &quot;\&quot; &amp;amp; Adapter, &quot;NetbiosOptions&quot;, 2
Next
WScript.Echo Now() &amp;amp; &quot; - Completed.&quot;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
				<pubDate>Mon, 25 Feb 2013 11:05:16 -0500</pubDate>
				<link>https://www.gregorystrike.com/2013/02/25/configure-netbios-over-tcpip-group-policy/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2013/02/25/configure-netbios-over-tcpip-group-policy/</guid>
			</item>
		
			<item>
				<title>Generate a Time Lapse Video from an Online Webcam Using Open Source</title>
				<description>&lt;p&gt;I’ve generated a couple time lapse videos in the past and I wanted to share my process with my readers.&lt;/p&gt;

&lt;p&gt;Let’s say you’ve found a webcam source online and you wanted to capture a time lapse video from it.  For instance, here is &lt;a href=&quot;https://www.nps.gov/webcams-yell/oldfaithvc.jpg&quot;&gt;Old Faithful&lt;/a&gt; at Yellowstone National Park which publishes a .JPG every minute.  How would you create a time lapse from it?  And even better, how would you do it using completely FREE software?!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/assets/legacy/oldfaithvc.jpg&quot;&gt;&lt;img src=&quot;/assets/legacy/oldfaithvc.jpg&quot; alt=&quot;&quot; title=&quot;Old Faithful Webcam Shot&quot; width=&quot;300&quot; height=&quot;228&quot; class=&quot;aligncenter size-medium wp-image-1478&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, since the script is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Bash_(Unix_shell)&quot;&gt;Bash&lt;/a&gt; script you need to be running Bash.  The easiest way to do this is to be running a version Linux (&lt;a href=&quot;https://www.ubuntu.com/&quot;&gt;Ubuntu &lt;/a&gt;or &lt;a href=&quot;https://linuxmint.com/&quot;&gt;Linux Mint&lt;/a&gt; are nice!) since Bash is usually the default shell.  You could also use Cygwin to do this in Windows, but it is beyond the scope of this article on how to use it.  From here on out, I will assume you are running Bash in Linux.&lt;/p&gt;

&lt;p&gt;Way back in 2007 I &lt;a href=&quot;/2007/06/06/bash-script-interval-get/&quot;&gt;published a Bash script&lt;/a&gt; that captures a URL at a provided interval and saves it to a directory.  This is the heart the process.  Go ahead and grab &lt;a href=&quot;/2007/06/06/bash-script-interval-get/&quot;&gt;the script&lt;/a&gt; and save it in your home directory as &lt;strong&gt;iget.sh&lt;/strong&gt;.  Though it’s pretty self-explanatory there is a more detailed explanation on the script’s page as well.  Once you have the script saved you need to give it execute permissions by running:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;chmod&lt;/span&gt; +x ~/iget.sh&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now we’re ready to capture the images.  Launch a terminal session and create a directory to store the webcam images.  Once created, change to that directory.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;webcam
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;webcam&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Run the iget.sh script with the required parameters.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;../iget.sh https://www.nps.gov/webcams-yell/oldfaithvc.jpg of.jpg 60&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The first parameter is the URL to be downloaded.  The second parameter (of.jpg) is a base file name, every file that is saved to your computer will be time stamped and ended with this.  Make sure you use the same extension (.jpg) that the webcam is publishing.  The third parameter (60) is the amount of seconds between captures.  Since the Old Faithful webcam updates every minute, I’ve chosen 60 seconds.&lt;/p&gt;

&lt;p&gt;Let the script run for as long as you want.  After you’ve captured all the frames you want for your video, move on to the next step.&lt;/p&gt;

&lt;p&gt;…Don’t worry, I’ll wait…&lt;/p&gt;

&lt;p&gt;…Got them yet?  Good!&lt;/p&gt;

&lt;p&gt;Ok, the next step is to delete any duplicate frames that may exist.  This can occur for a couple reasons but depending on what you’re using the video for you may or may not want to do this.  I prefer to delete them since I mainly use it for entertainment purposes and it creates a smoother looking video.  Save the following script to your home directory as &lt;strong&gt;rmdupe.sh&lt;/strong&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;cksum&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;sort&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; filelist

&lt;span class=&quot;nv&quot;&gt;old&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;while &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;read sum &lt;/span&gt;lines filename
&lt;span class=&quot;k&quot;&gt;do
      if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[[&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$sum&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$old&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
            &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;old&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$sum&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;continue
      fi
      &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;done&lt;/span&gt; &amp;lt; filelist&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Give it execute permissions using chmod and then run it in the directory you saved the .JPG files to.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;chmod&lt;/span&gt; +x ~/rmdupe.sh
~/rmdupe.sh&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Great!  Now we’ve got rid of all our duplicate files.  The next step is to remove any frames that may be corrupt.  To do this I’m going to use a utility called jpeginfo, don’t worry.   It’s free.  However, it may not be installed by default on your Linux distribution so you’ll have to install it.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;jpeginfo&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Once it’s installed run this in the directory.  It may take a while to go through but it will validate the JPEGs in the directory and delete any that fail validation.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;find &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-name&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;*&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-exec&lt;/span&gt; jpeginfo &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{}&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-E&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;WARNING|ERROR&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;cut&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot; &quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; 1 | xargs &lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now for the fun part where we convert the JPEGs to a movie.  To do this I’m going to use mencoder, another free utility available in Linux.  To install it run this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;mencoder&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And here’s a command to convert the JPGs to a movie.  You can tweak the arguments to change the codec, framerate, bitrate so be sure to check out the documentation how to tweak it.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;mencoder &lt;span class=&quot;s2&quot;&gt;&quot;mf://*.jpg&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-mf&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;fps&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;10 &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; OldFaithful.avi &lt;span class=&quot;nt&quot;&gt;-ovc&lt;/span&gt; lavc &lt;span class=&quot;nt&quot;&gt;-lavcopts&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;vcodec&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;msmpeg4v2:vbitrate&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;800&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Once done, you’ll have a time lapse .AVI file!  Here’s what it looked like after an afternoon of capturing.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/CbB1xNrLILY?hl=en_US&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;Thanks for reading guys!  Enjoy!&lt;/p&gt;

</description>
				<pubDate>Fri, 14 Sep 2012 16:23:09 -0400</pubDate>
				<link>https://www.gregorystrike.com/2012/09/14/generate-a-time-lapse-video-from-an-online-webcam-using-open-source/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2012/09/14/generate-a-time-lapse-video-from-an-online-webcam-using-open-source/</guid>
			</item>
		
			<item>
				<title>How to Deploy Adobe Reader (and Patches) with Active Directory</title>
				<description>&lt;p&gt;In my organization we push out Adobe Reader using an Active Directory policy.  In order to do this using we use the Software Management features of Active Directory which requires an .MSI.  Adobe supplies an .MSI for Adobe Reader and it’s relatively simple to deploy as long as it’s a base version (ie. no updates).  However, If you have to apply the quarterly updates the process becomes a little less intuitive.  It is my hope that contributing this information and the script below will make the process a little easier for people to keep their Adobe Reader patched.&lt;/p&gt;

&lt;p&gt;First, if you are deploying Adobe Reader, Adobe requires that you sign &lt;a href=&quot;https://www.adobe.com/products/reader/rdr_distribution1.html&quot;&gt;Distribution Agreement&lt;/a&gt; with them.  It’s free, really not that difficult and it’s the only way to legally obtain the .MSI required to do the deployment.  So just do it.&lt;/p&gt;

&lt;p&gt;The purpose of this post is really about how to patch an Adobe Reader .MSI with the .MSP in a way that you are still able to customize the patched version with the Adobe Customization Wizard and then have that in a ready state to deploy using Active Directory.  I’m not going to cover much of how to configure the group policies, I’m assuming that you already have that knowledge.  After all, you guys are smart! :)&lt;/p&gt;

&lt;p&gt;Since the scheduled updates of Adobe Reader is quarterly, patching it has not been I did often.  By the time the new patch came out, I had forgotten how to do the process and wasn’t able to devote the time into trying to do it again.  So, to help with this I’ve written a script that will patch the Adobe Reader .MSI using the .MSP and then extract some files from the .EXE installer. I’ll explain it below.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-batch&quot; data-lang=&quot;batch&quot;&gt;&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;OFF&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;REM Title:       AdobeReaderPatcher.cmd&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM Date:        8/22/2012&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM Author:      Gregory Strike&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM URL:         //www.gregorystrike.com/2012/08/23/how-to-deploy-adobe-reader-and-patches-with-active-directory/&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM Purpose:     Automate the process of patching the Adobe Reader .MSI Installer&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM Permissions: This script should be run from an elevated Command Prompt.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;REM This script was built using information I found at https://forums.adobe.com/message/4166521.&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;CLS&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;REM THESE MUST BE SET TO THE CORRECT VERSIONS!&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;BASEVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1010&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;PATCHVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1014&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;en_US&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;REM In most circumstances the variables following this line do not need to be modified.&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;BASE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;AdbeRdr&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;PATCH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;AdbeRdrUpd&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;CURDIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;vm&quot;&gt;%~dp0&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;AIPDIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%CURDIR%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;AIP&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;EXEDIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%CURDIR%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;EXE&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;REM Checking prerequisites&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Checking&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;prerequisites&lt;/span&gt;...
&lt;span class=&quot;kd&quot;&gt;IF&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;EXIST&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%CURDIR%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;BASE&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%%BASEVER%&lt;/span&gt;_&lt;span class=&quot;nv&quot;&gt;%LANG%&lt;/span&gt;.msi &lt;span class=&quot;kd&quot;&gt;GOTO&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;:MISSINGFILE&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;IF&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;EXIST&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%CURDIR%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;PATCH&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%%PATCHVER%&lt;/span&gt;.msp &lt;span class=&quot;kd&quot;&gt;GOTO&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;:MISSINGFILE&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;IF&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;EXIST&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%CURDIR%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;BASE&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%%PATCHVER%&lt;/span&gt;_&lt;span class=&quot;nv&quot;&gt;%LANG%&lt;/span&gt;.exe &lt;span class=&quot;kd&quot;&gt;GOTO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;MISSINGFILE&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;IF&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;EXIST&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;GOTO&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;:FOLDEREXISTS&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;IF&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;EXIST&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%EXEDIR%&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;GOTO&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;:FOLDEREXISTS&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;REM Creating AIP Folder base&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Creating&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;AIP&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Folder&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;base&lt;/span&gt;...
&lt;span class=&quot;nb&quot;&gt;msiexec&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;/a &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%CURDIR%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;BASE&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%%BASEVER%&lt;/span&gt;_&lt;span class=&quot;nv&quot;&gt;%LANG%&lt;/span&gt;.msi &lt;span class=&quot;kd&quot;&gt;TARGETDIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;/passive

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;REM Patching AIP with .MSP&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Patching&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;AIP&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;with&lt;/span&gt; .MSP...
&lt;span class=&quot;nb&quot;&gt;msiexec&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;/a &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\&lt;span class=&quot;nv&quot;&gt;%BASE%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;BASEVER&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%_%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;.msi &lt;span class=&quot;na&quot;&gt;/p &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%CURDIR%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;PATCH&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%%PATCHVER%&lt;/span&gt;.msp &lt;span class=&quot;na&quot;&gt;/passive

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;REM Renaming .MSI in AIP&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Renaming&lt;/span&gt; .MSI &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;AIP&lt;/span&gt;...
&lt;span class=&quot;kd&quot;&gt;RENAME&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\&lt;span class=&quot;nv&quot;&gt;%BASE%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;BASEVER&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%_%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;.msi &lt;span class=&quot;nv&quot;&gt;%BASE%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;PATCHVER&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%_%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;.msi

&lt;span class=&quot;c&quot;&gt;REM Extracting Setup Files from Base .EXE&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Extracting&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Setup&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Files&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Base&lt;/span&gt; .EXE...
&lt;span class=&quot;nv&quot;&gt;%CURDIR%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;BASE&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%%PATCHVER%&lt;/span&gt;_&lt;span class=&quot;nv&quot;&gt;%LANG%&lt;/span&gt;.exe &lt;span class=&quot;na&quot;&gt;-sfx&lt;/span&gt;_o&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%EXEDIR%&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;-sfx&lt;/span&gt;_ne
&lt;span class=&quot;kd&quot;&gt;COPY&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%EXEDIR%&lt;/span&gt;\Setup.exe &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup.exe
&lt;span class=&quot;kd&quot;&gt;COPY&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%EXEDIR%&lt;/span&gt;\Setup.ini &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup.ini

&lt;span class=&quot;c&quot;&gt;REM Updating Setup.ini&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Updating&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Setup&lt;/span&gt;.ini...

&lt;span class=&quot;kd&quot;&gt;TYPE&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%EXEDIR%&lt;/span&gt;\Setup.ini &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;FINDSTR&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;/I /V &lt;/span&gt;\&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;Product&lt;/span&gt;\&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup1.ini
&lt;span class=&quot;kd&quot;&gt;TYPE&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup1.ini &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;FINDSTR&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;/I /V &lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;MSI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup2.ini
&lt;span class=&quot;kd&quot;&gt;TYPE&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup2.ini &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;FINDSTR&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;/I /V &lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;PATCH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup.ini
&lt;span class=&quot;kd&quot;&gt;DEL&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup1.ini
&lt;span class=&quot;kd&quot;&gt;DEL&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup2.ini

&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt;. &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup.ini
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;Product&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup.ini
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;MSI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%BASE%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;PATCHVER&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%_%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;.msi &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;\Setup.ini

&lt;span class=&quot;kd&quot;&gt;GOTO&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;:END&lt;/span&gt;

&lt;span class=&quot;nl&quot;&gt;:MISSINGFILE&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt;.
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;ERROR&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;One&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;following&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;files&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;was&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;found&lt;/span&gt;:
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%BASE%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;BASEVER&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%_%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;.msi
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%PATCH%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;PATCHVER&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;.msp
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%BASE%%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;PATCHVER&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%_%&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;.exe
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt;.
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;. &lt;span class=&quot;kd&quot;&gt;Verify&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;these&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;files&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;exist&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;same&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;directory&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;script&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;%CURDIR%&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;.
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;. &lt;span class=&quot;kd&quot;&gt;Verify&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;BASEVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;PATCHVER&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;variables&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;are&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;correct&lt;/span&gt;.

&lt;span class=&quot;kd&quot;&gt;GOTO&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;:END&lt;/span&gt;

&lt;span class=&quot;nl&quot;&gt;:FOLDEREXISTS&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt;.
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;ERROR&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;One&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;both&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;these&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;folders&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;already&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;exists&lt;/span&gt;:
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%AIPDIR%&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;%EXEDIR%&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt;.
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Please&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;delete&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;these&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;folders&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;rerun&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;script&lt;/span&gt;.
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt;.

&lt;span class=&quot;nl&quot;&gt;:END&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt;.
&lt;span class=&quot;kd&quot;&gt;ECHO&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Script&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Complete&lt;/span&gt;.&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Unless Adobe changes the process or naming convention of their files this script should take three files and output a working AIP (Administrator Install Point) directory with a patched .MSI that is ready to deploy via Group Policy.  It follows all the steps that Adobe has laid out but simply automates it.  Using this, the AIP is also in a state that can be customized by the Adobe Customization Wizard if you need to create a transform (.MST) to customize the options that are deployed.  You only need this script if you are deploying a PATCHED .MSI.  If you are using a base version this is unnecessary.&lt;/p&gt;

&lt;p&gt;Here’s a list of the files you need.  You should be able to pull these from Adobe’s FTP site (&lt;a href=&quot;ftp://ftp.adobe.com/pub/adobe/reader/win/&quot;&gt;ftp://ftp.adobe.com/pub/adobe/reader/win/&lt;/a&gt;).  They should all be downloaded and placed in the same folder.  Again, remember the Distribution Agreement mentioned above.&lt;/p&gt;

&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;File&lt;/td&gt;
&lt;td&gt;Example Filename&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;The script above, Silly!&lt;/td&gt;
&lt;td&gt;AdobeReaderPatcher.cmd&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;The base .MSI&lt;/td&gt;
&lt;td&gt;AdbeRdr1010_en_US.msi&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;The .MSP patch&lt;/td&gt;
&lt;td&gt;AdbeRdrUpd1014.msp&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;The .EXE installer for the new version&lt;/td&gt;
&lt;td&gt;AdbeRdr1014_en_US.exe&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;Once all the files are downloaded and located in the same folder you need to update some variables in the script so that it knows which versions it’s working with.  The script doesn’t modify it’s logic based on these variables, it’s really just using them to generate filenames on the fly.  The script above was written shortly after Adobe Reader X v10.1.4 was released so it is already set to take the v10.1.0 .MSI and apply the v10.1.4 .MSP to the en_US version.  Note the following lines in the script is where you make the modifications.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-batch&quot; data-lang=&quot;batch&quot;&gt;&lt;span class=&quot;c&quot;&gt;REM THESE MUST BE SET TO THE CORRECT VERSIONS!&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;BASEVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1010&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;PATCHVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1014&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;LANG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;en_US&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Once your changes are saved, &lt;strong&gt;launch an elevated Command Prompt&lt;/strong&gt; and CD to your working directory.
&lt;a href=&quot;/assets/legacy/AdobeReaderPatcher_CDToDirectory.png&quot;&gt;&lt;img src=&quot;/assets/legacy/AdobeReaderPatcher_CDToDirectory.png&quot; alt=&quot;&quot; title=&quot;AdobeReaderPatcher - CD to Directory&quot; width=&quot;733&quot; height=&quot;395&quot; class=&quot;aligncenter size-full wp-image-1404&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once there run &lt;em&gt;AdobeReaderPatcher.cmd&lt;/em&gt; (or whatever you named it), and it will go through the patching process.
&lt;a href=&quot;/assets/legacy/AdobeReaderPatcher_RunningScript.png&quot;&gt;&lt;img src=&quot;/assets/legacy/AdobeReaderPatcher_RunningScript.png&quot; alt=&quot;&quot; title=&quot;AdobeReaderPatcher - Running Script&quot; width=&quot;733&quot; height=&quot;395&quot; class=&quot;aligncenter size-full wp-image-1405&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The script will generate a directory called “AIP”.  When all is done, this will be the folder you copy to your network share or customize with the Adobe Customization Wizard.  I should mention that the two setup (setup.exe and setup.ini) files that are copied are pulled from the .EXE.  It’s actually the only reason we need the .EXE.  Some of the options you may choose in the Adobe Customization Wizard require these files.&lt;/p&gt;

&lt;p&gt;It’ll be interesting to see if this works with the next version of Adobe Reader X (v10.1.5?).  Good luck everyone!&lt;/p&gt;

</description>
				<pubDate>Thu, 23 Aug 2012 15:48:27 -0400</pubDate>
				<link>https://www.gregorystrike.com/2012/08/23/how-to-deploy-adobe-reader-and-patches-with-active-directory/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2012/08/23/how-to-deploy-adobe-reader-and-patches-with-active-directory/</guid>
			</item>
		
			<item>
				<title>How to Check S.M.A.R.T Status of Hard Drive Remotely</title>
				<description>&lt;p&gt;SMART (Self-Monitoring, Analysis and Reporting Technology) is a technology incorporated into most hard drives that monitors the health the drive.  Using SMART, the drive will log read/write failures.  If the number of failures reach a certain threshold the drive can communicate that back to the BIOS or operating system and alert the user that the drive is failing.  It’s then up to the user to replace the drive before the loss of data.&lt;/p&gt;

&lt;p&gt;I needed a way to check the SMART status of a drive remotely and was able to come up with a couple different methods to do it.  I wasn’t interested in any of the metrics, only whether or not SMART thought the drive was failing.  So all of the examples below will give you the same answers but I thought I’d share the code for accessing it with a couple different languages.  All of the examples are remotely querying the computer using WMI, so it is important that you have security to WMI on the remote computer.&lt;/p&gt;

&lt;p&gt;This example, from Command Prompt using WMIC, will grab the Caption and Status for all drives on the computer.  Grabbing the caption is beneficial for identifying which status belongs to which drive.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-batch&quot; data-lang=&quot;batch&quot;&gt;&lt;span class=&quot;kd&quot;&gt;WMIC&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;/Node&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;:REMOTECOMPUTER&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;DiskDrive&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;GET&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Caption&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;Status&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Here’s an example using PowerShell:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$WMI&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-WMIObject&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Computer&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;REMOTECOMPUTER&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Class&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Win32_DiskDrive&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kr&quot;&gt;ForEach&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$Drive&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kr&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$WMI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$Drive&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Caption&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;: &quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$Drive&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Status&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And finally an example using VBScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-vb.net&quot; data-lang=&quot;vb.net&quot;&gt;strComputer = &quot;REMOTECOMPUTER&quot;
Set objWMIService = GetObject(&quot;winmgmts:&quot; _
    &amp;amp; &quot;{impersonationLevel=impersonate}!\\&quot; &amp;amp; strComputer &amp;amp; &quot;\root\cimv2&quot;)

Set colDrives = objWMIService.ExecQuery(&quot;Select * from Win32_DiskDrive&quot;)

For Each Drive in colDrives
    WScript.Echo Drive.Caption &amp;amp; &quot;: &quot; &amp;amp; Drive.Status
Next&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Running any of the above should give you the Caption and Status of the drive.  If the status is “Degraded” or “Pred Fail” it’s likely that the drive is going to fail and the drive needs to be replaced.  There are other values that status could be set to, for a more detailed explanation see &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/desktop/aa394132(v=vs.85).aspx&quot;&gt;Win32_DiskDrive class&lt;/a&gt; on MSDN.&lt;/p&gt;

&lt;p&gt;One thing to note is just because SMART or the Status say the drive is fine doesn’t mean it is.  If the drive is having issues and the logged failures on the drive haven’t crossed a threshold the drive may still report as “OK”.  However, if SMART is saying there’s a problem, you should be able to trust it.&lt;/p&gt;

</description>
				<pubDate>Fri, 03 Aug 2012 10:54:47 -0400</pubDate>
				<link>https://www.gregorystrike.com/2012/08/03/how-to-check-s-m-a-r-t-status-of-hard-drive-remotely/</link>
				<guid isPermaLink="true">https://www.gregorystrike.com/2012/08/03/how-to-check-s-m-a-r-t-status-of-hard-drive-remotely/</guid>
			</item>
		
	</channel>
</rss>
