Using Windows GitDesktop with Windows 10 Controlled Folder Access

The Windows 10 Fall Creators Update has a very useful new feature that can dramatically reduce the impact of ransomware: Controlled Folders. You should turn it on (Ed Bott’s article tells you how). Once it’s on, any attempt by an unauthorized program to modify files in controlled folders (including your OneDrive and OneDrive for Business folders and your Documents folder) will fail with an error message like this:

Controlled Folders doing their thing

The problem is, sometimes you want an application to have access to those folders. No problem: you can get there by opening the Windows Defender Security Center app, clicking “Virus and threat protection”, then clicking “Virus and threat protection settings,” and then finally selecting the “Allow an app through Controlled folder access.” It’s an easy enough process.

Unfortunately, you may find that the app you added to the list isn’t the app that actually runs when you try to do something. For example, when you run GitDesktop you’ll see a message like the one above because that app is actually a bundle that includes several binaries. You might think you can just add the binaries themselves, and you should be able to, but instead I got an error saying that the path I had entered wasn’t valid. That’s probably because I (lazily) installed the GitDesktop client on my… desktop… so its binaries are tucked away in my Users directory.

I spent some time scratching my head trying to figure out what to do, then discovered that you could enable Controlled Folder Access with the Set-MpPreference cmdlet. Of course, where there’s a Set- cmdlet, there’s usually a Get- cmdlet, and sure enough…

Get-MpPreference is your friend

A little more digging turned up the Add-MpPreference cmdlet and the associated ControlledFolderAccessAllowedApplications switch. A little digging to figure out which actual copy of git.exe  was being run and I was all set… until I started writing this post and found that SnagIt has the same problem!

Adding a new application

Thus I ended up solving two problems (“why doesn’t GitDesktop work?” and “why won’t SnagIt work?”), learning something new (*-MpPreference), and, at least hopefully, protecting myself and others against ransomware. Onwards!

 

Advertisements

Leave a comment

Filed under General Tech Stuff

Flying Friday: briefs

Recently I was on a work trip to the West Coast. While there, I had a customer meeting at the headquarters of a large utility company. I was a little surprised when the meeting began to see it open with our hostess saying “For this meeting, I’ll be the safety leader. In case of an earthquake, we’ll all duck under the table, cover, and hold. In case of fire…” She then went on to enumerate what we were all supposed to do in each of a variety of different emergencies: fire, active shooter, medical emergency, and so on. This was accompanied by her updating the small, permanently mounted whiteboard on the wall that listed who was responsible for handling each of these emergencies.

While it seemed really odd at the time, it fit in well with the many other safety posters we saw on the walls of this company’s HQ. They were clearly invested in improving their safety culture. Even though it might have seemed silly to brief what we were going to do in case of an earthquake (I’d already be under the table, crying like a toddler) or whatever, I could easily imagine these briefings taking place in every meeting in that building. Despite the inevitable eye-rolling, I believe that would help normalize safety, and safety planning, as an ordinary part of every activity at the company– which is exactly what they’re trying to do.

This same idea applies to general aviation. There are four times when briefings are a routine and normal part of our activities.

First, there’s getting a weather briefing, whether from a human or through a website or app. There’s a standardized flow and format for these briefings to make sure that all the needed information is communicated efficiently and concisely. FAR 91.103 requires pilots to obtain “all available information” concerning flights and that absolutely, positively includes weather information. Even if it weren’t legally required, as a simple matter of self-preservation, you’d be stupid not to get a thorough briefing and take the time to think through what you’ve been briefed on. The rate of change of the weather may be a surprise, but the fact of its change never should be.

Second, there’s the passenger briefing. The FAA private and commercial pilot practical test standards require the applicant to show how to give a passenger safety briefing. This can be elaborate, or it can be simple. For first-time fliers in my plane, I always thoroughly brief them on a few key points: how to open and latch the doors, how the seatbelts work, where the fire extinguisher is, and when I need them to be quiet. I also encourage them to ask questions about things they see, hear, feel, or smell, and to look outside and tell me if they see anything interesting (especially other airplanes). This is a low-key way to have them acting as extra eyes and ears.

Third, there’s the IFR approach procedure. The advent of fancy GPS systems (and coupled autopilots, may their names be blessed) means that some pilots are tempted to let the box do the work. Complacency is how you get AA 965, which killed 159 people and spawned the semi-famous talk “Children of Magenta.” I always read the approach procedure out loud, whether I’m flying by myself or not. Verbalizing each of the waypoints, crossing altitudes, and course changes is a great way both to prime myself for the approach but also to cross-check what I see on the approach plate with what’s loaded into the GPS. For example, for the RNAV 17 into Montpelier, Vermont (shown below), I’d read it back as “Cross REGGI at 6000, turn 168, cross JIPDO at 5000, cross ZAXOL at 4200, above 2980 cross WANUX”.

RNAV 17 into KMPV

The little inset in the upper-right corner of the diagram above is the missed approach procedure. It has a separate textual description elsewhere on the approach plate, and I always read it out too. This is what I’d do if I got down to minimums on the approach above and found that I couldn’t see the runway– I’d fly the missed approach (a straight-ahead climb, followed by a climbing turn to the Montpelier VOR and a course hold there).

Going missed? Here’s how

There are other types of briefings that are common in other parts of the aviation world. For example, military preflight briefings include information about tactical stuff that doesn’t apply to me, and airlines often have maintenance handover briefings when a flight crew picks up a jet for their leg. For me, though, the four types above cover everything needed for a safe and efficient flight… except what to do in case of an earthquake, and I’ll try to figure out how to work that in later.

1 Comment

Filed under aviation

Training Tuesday: setting up swim intervals with your Garmin watch

A few months ago, I wrote a post about setting up run intervals on Garmin watches. This turned out to be a pretty popular topic, because it’s a very useful feature, the alternative being to write your intervals down on a piece of paper and use your watch or stopwatch to track them. Garmin Connect has a similar function for swim intervals, and I’ve recently started using it, but it has a few quirks you should know about to make most effective use of it.

Let’s build an example workout based on what my coach, Jon Fecik, gave me today:

  • 4×500 (15) as…
  • warm up choice
  • 50 stroke focus/50 swim…for stroke focus… continue to swim freestyle but focus on 1. more catch up and high elbow, 2.) extend back end of stroke, 3.) finger tips close like the finger tip drag drill, 4.) tight kick, 5.) drive hips
  • Paddle pull with buoy…moderate effort
  • swim easy cool down

This is pretty simple, which is good, as Garmin’s swim interval tools aren’t quite as powerful as the ones for managing run intervals.

Start by logging into Garmin Connect, then in the left navigation bar choose Training > Workouts. That will take you to the Workouts page, which looks like this:

Start with your workout list, which may look different from mine

At the top, click on the “Select a workout type…” pulldown, choose “Pool swim,” and click “Create a workout.” That will take you to the interval builder, which you may remember from my earlier post. By default, you get a workout with a warmup, a two-repeat interval, and a cool down:

You get a warmup, a cool-down, and a two-repeat interval for free

Before you do anything else, check the “Pool size” field on the right and make sure it’s correct. Trust me on this. You might also want to use the pencil icon at the top to edit your workout name, so you don’t end up with 10 “Pool workouts” in your list.

The controls for each item in the workout are pretty much self-explanatory: the “Duration” field lets you control whether the interval is based on time or distance, and the “Any stroke” pulldown lets you choose the stroke type if you want to specify one. Keep in mind that Garmin’s watches will try to automatically detect your stroke but they don’t always get it right if you swim like I do.

Super important note: if you’re doing drills as part of a set, set the “Any stroke” control to “Drill.” If you don’t do that, the watch won’t count your distance– for example, if you have a 200yd kick set, and thus aren’t moving your arms, the watch will sit patiently at “200 y remaining” forever because it doesn’t see you swimming.

Note the “Rest” control. This is important too. By default, every interval in the set will have a rest after it, of whatever duration you specify. However, the last interval in a repeat will always have a “rest until button press” added to it. Read on and I’ll show you why that is.

The “Equipment” field is important too, and it’s not present in the run interval builder. This is where you specify what pool toys you’re using for a given interval.

Armed with that knowledge (oh, and the knowledge that the “+” and “-” buttons in the repeat block will do what you expect), let’s build my workout. Start by setting the warmup and cool down distances to 500yds of any stroke… that’s easy enough.

The main set is a problem. Jon wanted me to swim 50/50 x 5, where the first 50 is a drill and the second 50 is a normal swim. Garmin doesn’t let you have more than one item in a repeat– all you get is one swim and one rest per repeat set. I don’t know why this restriction exists, as the run interval tool lets you add steps to a repeat, but whatever. So the best I can do is this:

Remember, only one swim step per interval

I’ll have to remember to split the 100 up so that the first 50 is focused on each of the items Jon asked me to focus on. Note that I set the rest duration to 15 seconds, as directed. The builder automatically inserted a rest step after the interval– notice that it even tells you “The last rest in this repeat block will be ignored by your device” in the workout builder.

Now I need a pull set, so I’ll click “Add a step” and set the step distance to 500yd and then use the “Equipment” link to specify paddles. Unfortunately, you can only specify one equipment item (kick board, paddles, pull buoy, fins, or snorkel) so it’s on you to remember if you need more than one item,.

There’s the pull set…

Then the cool down is easy– a distance of 500yd of any stroke.

The completed workout looks like this:

The full workout

Click “Save Workout” and boom, it’s saved and visible on my phone. A quick tap of the “Send to device” button and now it’s on my watch, ready to go.

Using the workout is a little more complex, but not really. On my Fenix3 HR, I just go to Training > My Workouts and pick the workout, then select “Do Workout”. Once you start the workout, the watch will track distance for each interval, giving you an on-screen countdown of distance remaining. It will buzz when you’re on the last lap of each step, so you know it’s about time to stop. Note that it doesn’t mark a step as done until you press the “lap” button– so, for example, when I’m swimming my 100s I have to press “lap” and then the 15-second rest period starts. When the rest period ends (whether that’s because you have a fixed rest or a fixed duration per step), the watch assumes you will start swimming again, so you don’t need to re-press “lap”.

Speaking of fixed time intervals– yes, you can do those. For non-swimmers: this is an EMOM-style interval where you’re supposed to swim a distance and then start at the same time. The faster you go, the more rest you get. For example, if my coach says “swim 100 every 2:15”, if it takes me 2:00 to swim the first 100, I get 15 seconds of rest. If the next one takes me 1:55, then I get 20 seconds. And so on. To set these up, set the rest period in the repeat to “Fixed repetition time.”

Timed repeats are the devil

That’s it– happy swimming! (Oh, in case you were wondering: no, I don’t know which specific Garmin devices support this– certainly the tri-focused Fenix3/5 and the 735/920/935xt do but I don’t know about any others).

 

 

 

 

Leave a comment

Filed under General Stuff

My screen went gray: how to turn off Windows 10 color filter mode

I like to think I know my way around Windows after using it daily since Windows 3.1. Sometimes it still surprises me, though.

Today I was working on a blog post for the ENow blog (stay tuned, you’ll see it shortly). I went to copy a quote from a press release and, suddenly, this is what I saw:

Grayscale Windows screen

Where’d my color go?

I couldn’t figure out what the hell had happened, but my screen was suddenly gray. It was at the correct resolution, and everything looked the same except it was gray. At first I thought I’d mistakenly turned on high contrast mode (which you do with left Alt+left Shift+PrtSc) but nope.

A little digging led me to the dialog shown in the image above. Apparently Windows has a “color filter” mode that, when invoked, makes it easier to see certain colors. It’s intended for people with color-vision deficiencies. For ease of use, Microsoft tied it to a key combination: the Windows key + Ctrl + C. I must have accidentally bumped the Windows key while copying my quote.

Now you know.

1 Comment

Filed under General Tech Stuff

Clearing the Windows 10 external monitor cache

I bought a Surface Book on day 1 of its availability, 2 years ago this month. It’s been an excellent machine. I almost never use it with the clipboard undocked so I’m not sure I’d buy another one, but it’s been good.

Recently, though, it has developed a displeasing habit of failing to recognize external monitors. For example, last week when I was at Ignite, I had to borrow Richard’s laptop to do my product demos because mine wouldn’t talk to the monitor we had available. When I got back from Ignite, it was worse– I couldn’t use an external monitor either through the Surface Dock or the built-in DisplayPort. It didn’t matter what monitor or adapter I used, either. The only way I could make an external display light up was to undock the clipboard and plug the dock connector into it.

I tried a large variety of things to fix it, including updating the firmware on the Surface Dock, reverting to an older preview build of Windows, sacrificing a chicken, and loud cursing. Nothing.

Then I posted on Reddit. Within an hour or so, a user posted a link to this thread, and I found the magic solution. I unplugged the dock, deleted HKLM\System\CurrentControlSet\Control\GraphicsDrivers\Connectivity and HKLM\System\CurrentControlSet\Control\GraphicsDrivers\Configuration, plugged the dock  back in, and boom! The external monitor now works normally.

My theory is that a bug in Windows 10 and/or the Surface dGPU driver and/or Windows Insider upgrades caused the problem. I’m not really interested in figuring out the root cause now that I know how to fix it.

Hopefully this will help future generations who may have this same issue…

Leave a comment

Filed under General Tech Stuff

Office 365 Exposed, episode 9

I just got back from Microsoft Ignite, where I stayed locked in a restaurant with customers for almost the entire time. Thankfully, I was able to escape long enough to sit down with Tony Redmond and Microsoft’s Christophe Fiessinger to talk about Office 365, Groups, Ignite, and a bunch of other stuff… in front of a live studio audience. That means that, when you hear people laughing, it’s not scripted for once. Enjoy!

1 Comment

Filed under Podcasts

Removing Exchange Online calendar events when the meeting organizer leaves

“Hey, look! A new Office 365 feature!”

I get to say this a lot given how often Microsoft drops new features into various parts of the service. Sometimes they announce these features in advance, and sometimes they don’t. Sometimes these features are large, and sometimes they’re small.. but even the small ones are often surprisingly valuable.

Today’s example: the new Remove-CalendarEvents cmdlet, which solves the issue of what to do with recurring meetings when a user leaves or is on extended leave. Here’s what the documentation says:

This cmdlet cancels meetings in the specified mailbox where the mailbox is the meeting organizer, and the meeting has one or more attendees or resources. It doesn’t cancel appointments or meetings without attendees or resources.

This is perfect for handling the case when someone leaves an organization and leaves behind recurring meetings, but it’s also useful for cleaning up calendar items for people who are on parental leave, medical leave, or other types of absence with a defined start and end time.

You can cancel all meetings with the -CancelOrganizedMeetings switch, or you can specify a date range with switches to specify the start date and the number of days or the end date to cancel. Keep in mind that if you don’t include -CancelOrganizedMeetings, nothing will happen when you run the cmdlet– if you want to see what it would do, you can use -PreviewOnly. I am not sure why the team didn’t use the standard -WhatIf switch, but that’s a minor point.

The cmdlet is very easy to use. I wanted to cancel all future meetings organized by a user who’s left my tenant, so this is what I did:

A single cmdlet will remove all of the target user’s meetings

Note what happened on the first try– I didn’t specify any switches, and the cmdlet warned me that it wouldn’t do anything… and indeed, it didn’t. The second attempt did exactly what it was supposed to:

Poof! no more meeting

I was delighted to see this result– it’s proof that Microsoft is paying attention to the small sharp edges that sometimes annoy administrators disproportionately. Hats off to the calendaring team (hi, Julia!) and thanks for listening.

1 Comment

Filed under UC&C