<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="http://davidarno.org/feed.xml" rel="self" type="application/atom+xml" /><link href="http://davidarno.org/" rel="alternate" type="text/html" /><updated>2021-06-07T14:06:07+00:00</updated><id>http://davidarno.org/feed.xml</id><title type="html">The Random Thoughts of David Arno</title><subtitle>My general tech related thoughts and ideas</subtitle><author><name>David Arno</name></author><entry><title type="html">MS Teams On Air Sign - Using the registry to monitor webcam and microphone use</title><link href="http://davidarno.org/using-the-registry-to-monitor-webcam-and-microphone-use/" rel="alternate" type="text/html" title="MS Teams On Air Sign - Using the registry to monitor webcam and microphone use" /><published>2021-06-07T00:00:00+00:00</published><updated>2021-06-07T00:00:00+00:00</updated><id>http://davidarno.org/using-the-registry-to-monitor-webcam-and-microphone-use</id><content type="html" xml:base="http://davidarno.org/using-the-registry-to-monitor-webcam-and-microphone-use/">&lt;p&gt;&lt;img src=&quot;/images/on-air.jpg&quot; alt=&quot;On Air sign&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I’ve worked at home 1-2 days a week for many years now, but with the COVID pandemic, I - like so many others - found myself not only working at home full time, but I also was then taking part in many video calls and the rest of the family were at home too. Whilst I don’t mind members of my family appearing on my video calls, they were less keen. So I wanted a way of notifying them when I was on a call. Yelling out “On a call!” across the house wasn’t popular, so I decided I needed a clear “on a call” sign instead. And I wanted it to automatically turn on and off when the call started and ended.&lt;/p&gt;

&lt;p&gt;This article focuses on how the registry can be used to solve the first step of this challenge: telling when MS Teams is accessing the camera and microphone.&lt;/p&gt;

&lt;p&gt;As of &lt;a href=&quot;https://support.microsoft.com/en-us/windows/windows-10-camera-microphone-and-privacy-a83257bc-e990-d54a-d212-b5e41beba857&quot;&gt;Windows 10 1903, Microsoft added additional controls around apps accessing various resources&lt;/a&gt;, such as location and - of interest here - webcams and microphones. This appears in Windows as App Permissions within Settings:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/app-permissions.png&quot; alt=&quot;App Permissions in Settings&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In addition to being able to toggle whether apps can access a resource, these settings also show which apps have accessed it and when:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/camera-access.png&quot; alt=&quot;App Permissions in Settings showing Camera access times&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And it turns out that all of this information is stored in a simple form in the registry under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore&lt;/code&gt;. For each of the resources that you can grant/deny apps permssion to, there’s an entry in the registry with a value of “Allow” or “Deny”:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/registry-consentstore.png&quot; alt=&quot;Consent store info in the Regstry&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In addition, for each entry, we have a list of applications (those not installed as part of Windows appear below &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NonPackaged&lt;/code&gt;) and two keys for each: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LastUsedTimeStart&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LastUsedTimeStop&lt;/code&gt;, which contain a date/time value (the exact format of which isn’t of interest in this instance):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/camera-access-times.png&quot; alt=&quot;Camera access times in the registry&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When for example, the camera is accessed, that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LastUsedTimeStop&lt;/code&gt; value is reset to zero. When the camera stops being used, the time it stopped is recorded in that value and so it becomes non-zero. And that is all that’s needed to tell whether the camera is in use by a particular application or not. In my case, I’m interested in MS Teams, so I simply monitor the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LastUsedTimeStop&lt;/code&gt; of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\&lt;/code&gt;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ConsentStore\webcam\NonPackaged\C:#Users#david#AppData#Local#Microsoft#Teams#current#Teams.exe&lt;/code&gt;
and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\&lt;/code&gt;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ConsentStore\microphone\NonPackaged\C:#Users#david#AppData#Local#Microsoft#Teams#current#Teams.exe&lt;/code&gt;
keys to tell me whether the camera and microphone are in use.&lt;/p&gt;

&lt;p&gt;So now all I had to do was write an app that monitored those registry keys and talk to a Raspberry Pi, that in turn could turn the sign on and off and I had my completed “On Air” sign for my Teams calls. How I did that will be the subject of a future blog post.&lt;/p&gt;</content><author><name>David Arno</name></author><summary type="html">...I wanted a way of notifying [the family]] when I was on a call. Yelling out &quot;On a call!&quot; across the house wasn't popular, so I decided I needed a clear &quot;on a call&quot; sign instead. And I wanted it to automatically turn on and off when the call started and ended. The registry came to the rescue...</summary></entry><entry><title type="html">The Random Thoughts of David Arno is reborn</title><link href="http://davidarno.org/the-random-thoughts-of-david-arno-is-reborn/" rel="alternate" type="text/html" title="The Random Thoughts of David Arno is reborn" /><published>2021-05-24T00:00:00+00:00</published><updated>2021-05-24T00:00:00+00:00</updated><id>http://davidarno.org/the-random-thoughts-of-david-arno-is-reborn</id><content type="html" xml:base="http://davidarno.org/the-random-thoughts-of-david-arno-is-reborn/">&lt;p&gt;I once had a blog. It was a Wordpress one, hosted on Dreamhost. I started that blog 14 years ago in 2007. Back then, Wordpress was the blogging tool of choice as it was simple to set up, easy to configure and the like. And I was using Dreamhost for other things and they offered a simple Wordpress site setup, so it was the obvious way to create my blog.&lt;/p&gt;

&lt;p&gt;The blog waxed and waned; sometimes I was actively blogging, other times I’d not go near it for months on end. And it developed a problem: the earliest posts were getting very old, irrelevant and often I’d find I now completely disagreed with what I’d said in the past. Further, some of those posts were major “toys out the pram” rants that I find quite embarrassing to read these days. Then around five years ago, I started playing around with a great tool for creating static websites from dynamic content called Jekyll, in order to create a new blog. This turned out to be a massive exercise in yak shaving. (For those unfamiliar with the term “yak shaving”, I’d suggest you read &lt;a href=&quot;https://seths.blog/2005/03/dont_shave_that/&quot;&gt;“Don’t Shave That Yak!” by Seth Godin&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;You see back then, Jekyll didn’t work with Windows, but a new thing had appeared for Windows 10: Windows Subsystem for Linux. and Jekyll did work with Linux. So rather than create content for a new blog, I spent lots of time trying to set up Jekyll, create the right look etc. And then I discovered Github pages, which are Jekyll based and so in theory, I could run the site locally, get it looking right and then git push the content. But of course, there was no content still, just lots of incompatible Jekyll parts (why write content when you can start writing new gems…). Then at some point in the last couple of years, an automatic update of Wordpress by Dreamhost killed my blog (I think that’s what happened anyway as I’ve no idea when it went down). So I no longer had a blog. Instead, I had a bunch of old, inaccessible articles and enough yak hair to supply a sofa factory for many years.&lt;/p&gt;

&lt;p&gt;Jump to 2021 and things have changed for me. I have recently started a new job with an amazing bunch of people at &lt;a href=&quot;https://www.orbussoftware.com/&quot;&gt;Orbus Software&lt;/a&gt;. And - this is the best bit - they already “do agile”! We have product owners, scrum masters, squads, short iterations leading to frequent releases, we configure infrastructure using DevOps principles. We even have automated regression tests built into our “definition of done”! This means I can just get on with the job of leading a team of developers and testers in creating a great product for our customers. I’m not spending my time and energy trying to convince sceptical managers and peers that their current waterfall-based process-laden approach is a proven failure. And so I find I have my enthusiasm for technology back again.&lt;/p&gt;

&lt;p&gt;This led my to revisit the idea of that new blog. And this is it. It’s built using Jekyll and Github pages. But because the tooling is much improved, coupled with the fact that I found just the theme I was looking for to get me started, I was able to get going quickly. There’s plenty of things I want to add (support for comments, republishing the best of the old blog’s articles etc), but I’ve learned from my previous mistake. For now I’m focusing on content rather than getting all the bells and whistles in place. And so if you made it this far, you have just read the first post on that new blog. Here’s to many more in the coming months.&lt;/p&gt;</content><author><name>David Arno</name></author><summary type="html">I once had a blog. It was a Wordpress one, hosted on Dreamhost. I started that blog 14 years ago in 2007...</summary></entry></feed>