Notes on Converting Mini-Compressor to UWP Application (Trying to at Least)

I was inspired to get Mini-Compressor to UWP into the Windows 10 Store a while back this summer. I saw this video several months ago when it was called Project Centennial:

Then a couple weeks ago there was a form you could fill out and a Microsoft employee would help you convert your application.  So I filled out the form about my tiny little application called Mini-Compressor and was surprised when I heard back.  The fellow was very helpful but in the end we couldn’t get Mini-Compressor ported to UWP.

Spoiler: UWP applications can have custom context menu items but not for *.jpeg files.

So why am I writing this if we failed?  Because I think there is still something to learn from my failure.  Same reason scientist should publish failed experiments.

Also I setup a goal to post something and figured this would do.  So without further ado here are the notes I took.

Doing Research

Read about converting applications and the requirements.  Right away I saw potential show stopper: Shell Extensions are not supported in UWP.  There where a couple other minor issues, like registry entries not allowed in the machine hive, but I could work around those.  The whole point of Mini-Compressor is to right click on a file or folder to compress the images.  Being the optimistic guy I am I think there might be a way around this so I decide to proceed.  With the help of my new Microsoft contact we made good progress.

The next thing I read was setting up the Desktop App Converter program.  It’s actually not too hard, just follow the instructions.  I’ll show you my instructions a little later.

Upgrade to .NET 4.6.2

Before I did anything I updated Mini-Compressor to .NET 4.6.2.  This was actually pretty painless.  I just picked each C# project and upgraded it to .NET 4.6.2.  Everything still compiled, tests passed, and the automated build succeeded.

Remove the Shell Extension Project

The Shell Extension is what allows users to right click a folder or file to compress them.   In Mini-Compressor this is the MiniCompShellExt project and is responsible for adding the Mini-Compressor menu item to the popup menu that appears when you right click on the folder or file.  It’s also responsible for determining the file(s)/folders clicked on and passing them to the actual Mini-Compressor program.

It’s sad to have to remove this because this is the hardest part of Mini-Compressor to write.  At least for me.  I had to learn how Shell Extensions work and remember C++ (hadn’t been used since university).  It was also the key feature of Mini-Compressor.  You could right click on a file or folder and compress them.

A moment of silence for the MiniCompShellEx project.


Thanks to TortoiseSVN and other Tortoise projects,  I modeled my Shell Extension off these projects.


Remove Unused Build Configurations

Now that we no longer have the Shell Extension project we can remove some build configurations.  Currently Mini-Compressor has 6 build configurations.
The MiniCompShellExt was a C++ project and needed a separate compile for x86 and x64 operating systems.  Mini-Compressor also has a trail and paid-for builds.


Side note: Why the trial and paid for-builds?  The answer is Mini-Compressor didn’t use a key to unlock it after you purchased it.  Instead a trial check was hard coded into the application.  Similar idea to a demo version of a game versus the full release version.
I was not a big fan of keys because people tend to lose them, at least back in the day.  Now that is less of an issue with everyone saving their key to e-mail.

Back on topic, just keep the Debug and Release builds.  No need for the x64 builds and trial builds.  Actually now that I think of it how does Microsoft Store handle demos?  I should check that out.

Update the Installer

I used Advanced Installer to create the installer for Mini-Compressor.  I used Advanced Installer because it let me create a single install for both 32-bit and 64-bit applications.  This is no longer needed.

Actually running the Microsoft Bridge application on the single install exe does not work.  What I really want is a single platform, 64-bit, installer.  To make this happen I made the below changes to my existing project.

Package Type: 64-bit (AMD64, EM64T)

Advanced Installer Change Package Type

Remove 32-bit and Shell Extension files.

Advanced Installer Remove Files

Remove registry entry required for shell extension.

Advanced Installer Remove Registry Entries

Remove trial build.

Advanced Installer Remove Trial Version

Add File Associations. (this actually did nothing but I was hoping it would help)

Advanced Installer Add File Assoications

Remove Stopping the Explorer process and .NET Installer.

Advanced Installer Stop Explorer Process

I am using an old version of Advanced Installer (version 9.9, current version is 13.1) and don’t have a license for the new version.  Maybe in the future I’ll update to the new version so I can build AppX applications directly instead of running the Microsoft Bridge.

Setup the Desktop App Converter

Download the Desktop App Converter and the wim image.  Then open a PowerShell as admin and type the following to setup the image:

PS C:\> Set-ExecutionPolicy bypass

PS C:\> .\DesktopAppConverter.ps1 -Setup -BaseImage .\BaseImage-1XXXX.wim –Verbose

This can take a while and only needs to be done once.

Run the Desktop App Converter

Again in PowerShell run the following command:

PS C:>.\DesktopAppConverter.ps1 
-Installer "<path>\Mini-Compressor-" 
-InstallerArguments "/qn" 
-Destination "<path>\MiniCompConverted" 
-PackageName "MiniCompressor" 
-Publisher "<Full publisher name on your code signing certificate>" 
-MakeAppx –Verbose

This command takes the existing installer exe and installs it in the wim image you setup earlier.  The process runs some tests on the install process and also notes what file and other install actions are taken.  It then creates a AppX install file.



Sign the Appx package.  Do this using the Visual Studio command line and the Saturday MP cert.

PS C:>signtool.exe sign 
-f saturdaymp.pfx 
-p <password>
-fd SHA256 
–v MiniCompressor.appx

If you don’t have a code signing certificate then you can create your own certificate.

Now you can double click your AppX application on a Windows 10 machine and it will get installed.  Notice it didn’t include any of the nice images I had in my old installer.

Install AppX Mini-Compressor

No Right Click

I encountered some small issues following the above steps but overall it was relatively painless.  Unfortunately when I was done I couldn’t right click on anything using Mini-Compressor.  I could run the application from the Start menu but no right click.  That said I kind of knew this would happen based on my initial research.

I talked to the helpful fellow at Microsoft and he said there is a way to add shell extensions in AppX applications.  You need to add the following to your AppX manifest file:

  <uap3:Extension Category="windows.fileTypeAssociation">
    <uap3:FileTypeAssociation Name="imagefiles">
      <uap:DisplayName>Image Files</uap:DisplayName>
        <uap3:Verb Id="Compress" MultiSelectModel="Player" Parameters="&quot;%1&quot;">Compress</uap3:Verb>
        <uap3:Verb Id="CompressExtended" MultiSelectModel="Player" Extended="true" Parameters="&quot;%1&quot;">Compress Extended</uap3:Verb>

Note that after updating the manifest file I needed to re-create the Appx file.  I did this by running the following command:

makeappx.exe pack -d PackageFiles -p Output

Notice that I added the jpg, jpeg, and blah types.  At first I added just the jpg/jpeg types but that did not seem to work.  When I added the blah type I could right click on blah files.

Turns out certain file types are reserved and can’t be used.  Of course the jpg/jpeg file types can’t be used.  That made me sad.  Maybe in the future if Microsoft makes the jpg/jpeg not reserved then maybe I’ll try upgrading Mini-Compressor again.

So that is the end of my long journey.  While it didn’t end the way I wanted it to, I did learn some things and wanted to share them with you.  That, and as I said at the beginning, I think it’s important to share successful as well as failed experiments.




Posted in Business Side, Mini-Compressor, Notes, Software Development | Tagged , , , , , , | Comments Off on Notes on Converting Mini-Compressor to UWP Application (Trying to at Least)

Math is hard.


Few people tell me that they love math.

It brings back memories of sitting in a small, windowless room, back in grade 11, with my math tutor. My tutor smoked cigars. Lots of cigars. He smelled like a giant cigar. I really didn’t want to be there, but my math grades were abysmal. I tried – superficially, at best – to memorize the patterns of algebra, but desire to receive a non-abysmal grade in that class was overshadowed by a large teenage helping of “not giving a …”

I did pass (somehow), and went on to become a decent statistician in university. The beauty of stats, though, is that you rarely do the computations by hand. You just need to know what kind of analysis need be done on a dataset, plug it into a computer program, and voila. I was so used to doing those analyses that I started to think I was good at math.


Wrong. When a computer does all the analyses for you, it doesn’t mean squat.

I have reached a point in my grander goal that I do not like. Inevitably, there are parts of a goal that you really loathe. For some, it might be getting up early or changing your eating habits. For me, it’s re-learning how to do math by hand. Math is part of the written entrance exams for nearly all police services, EPS included. Yours truly could not do long division to save her life.


Math is worth a significant portion of the exam. I sat down one afternoon, flipped open the study manual, and started math-ing. Ok, first you see how many times the first number goes into…no, wait, what do I do with this decimal…wait, I think you move it over here… no. System failure. Stupid math. I decided to ignore it completely. However, things you ignore have a nasty way of following you around and permeating everything you do. Math was always there, like a malevolent dog that followed me home.

Ignoring it wasn’t making it go away.

There was only one thing left to do. Just study. No way around it. As loathsome a task as math is, refusing to acknowledge its existence is futile. Every goal has nasty bits. In the wise words of Yoda: “Do or do not. There is no try.” Even with math.


Posted in Fun, Goal App | Comments Off on Math is hard.

The Olympics versus Accountability

Routines are great. Sure, they can be difficult to get up and running, but once you have one, things don’t feel quite right when you miss part of it. For the last many months I have been going to the gym every other day. For the last month, I’ve been going to Run With Recruiters twice per week. I was feeling pretty darn good about that and was in the best shape of my life. I wrote all these things on my calendar, and felt a great sense of accomplishment every time I looked at it.

Change was a-coming. My parents were heading to Scandinavia for three weeks and needed a house sitter. Of course I wanted to help them, but it meant leaving my routine completely and trading city life for small town Saskatchewan life. No fancy gym. No group of EPS hopefuls to run up and down stairs with. I wondered how I would adapt.


I had noble visions of running country roads (and hills…there are indeed hills in Saskatchewan) and going to the small gym in my home town. But eventually, my days started to look like this (see above).

sirensongThe siren song of the Olympics was very strong, and I found myself velcroed to the couch (even while wearing my EPS Run with Recruiters shirt…that makes it count, right?).

I started to wonder what everyone was up to back in Edmonton. I would look at the clock on Mondays at 5 and imagine that enjoyitwhileitlastseveryone in the RWR group was pounding out pushups and burpees. Meanwhile, I convinced myself that watching the Olympics counted as exercising.

However, a month went by very quickly. The party was ending, and soon it would be time to get my sorry self back into my regular routine.


I would like to report that I burst out my front door and ran stairs like a champ the minute I got home. The first few days of getting back in my workout routine went more like this, though (see below)…..


Nothing to see here, folks. Move it along.

I did get a few good runs and workouts in, but sticking to a routine out of the usual context was tough. It’s especially tough when no one is keeping tabs on you, or expects to see you in a certain place at a certain time. Being self-accountable takes a tremendous amount of discipline.

Now that I’m back (and the Olympics are over), it’s time to restart the routine and get back to working on Goal Buddy. The concept of self-accountability is a primary driver in GB’s development. It’s definitely challenging to stick to a routine when there aren’t other humans to answer to, but it’s not impossible! Good thing it’s a while before the next Olympics are on…

Posted in Fun, Goal App | Comments Off on The Olympics versus Accountability

What I Learned this Summer – 2016 Edition

I am about 1 month early on my traditional “what I learned this summer” blog post, but I’m learning so felt the need to write it down!  For those following along at home, here are the lessons covered: 2012, 2013, and 2014.

And now, in the midsummer of 2016, amid the rainstorms, travelling fairs and mosquito bites, I declare that I am learning a lot.  The software developer that I’m married to (Chris) is a lot like an artist or a Granville Island shopkeeper.

Developpers Hours

Sure, I get it – we’re in the middle of developing our Goal Buddy app and there’s only so many hours in between camping and out of town guests.  What if, though, the mood strikes like a clap of lightning?  Off he goes running to chain himself to the basement computer!  Do not disturb, Darling Daughter, when he’s got his early morning revelations and late night inspirations.  You should try dining with him!  I’m proud to know him well enough when he has his “thinking” face on.  Yes, you may be dismissed from the table… I’m sure Joni Mitchell’s family dealt with that too.

While the results are hardly visible like a Jackson Pollock painting, Chris’s dedication to his art is admirable.  There can be so many distractions when your home office is at home, and so many more during the summer when everyone else is on vacation or having backyard sleepovers.

It’s still nice to know that when a particularly cool lightning show hits, he’s able to come upstairs and witness it with us.  Then back to the Goal Buddy Salt Mines he goes.  I wonder if writers like Kristan Higgins and Danielle Steele are the same way.





Posted in Business Side, Fun, Goal App | Comments Off on What I Learned this Summer – 2016 Edition

Push It Real Good – Version Control in Real Life

Several weeks ago, Chris gave Ada and I a mini-workshop on “version control.” Wondering what that is? (I certainly was, at the time) In non-programmer’s terms, version control describes how, when several people are working on the same code, they make sure that they are working on the most up-to-date version that includes everyone’s edits. Version control uses some pretty entertainexplainingversioncontroling jargon; for example, you “pull” the most recent version of a file, and then “push” the changes you’ve made. Each change must be “committed” to update the file. That way, there aren’t a slew of working copies floating out there and no one knows which is the most recent version. Visually, you could think of it like this:


A few days later, Ada mentioned that the whole push/pull thing was a lot like going through various stages of life, wherein one “pushes” a life change (like starting university or a job) into your life and that change becomes integrated (i.e., committed)stick01 into the main branch (i.e., the master copy) of your life. I wondered what it might look like on paper…

The earliest thing I remember wanting to be was an airline pilot. Don’t ask me why. Jumbo jets impressed my 7 year old self.


I think veterinarian came next. (foreshadowing for cats?)


Then physician (glad I got that out of my system as an undergrad!).


Then research scientist. That actually lasted for quite a while.



This overlapped with restaurateur (not going to elaborate that one today…). This is where things got confusing…I think it was a “multiple working copies and I don’t know which version is the most up to date one” kind of situation.


stick06And here we are at the Officer Sunglasses version. There are tons of changes in this version (more than I have space for here). Looking back at the chain of command, I can see how all past changes lead to this one, even if that isn’t immediately apparent. So don’t be afraid to push changes. Push it. Push it real good!

Posted in Fun, Goal App | Comments Off on Push It Real Good – Version Control in Real Life

Fixing MSBuild not Exiting

After upgrading to Visual Studio Xamarin 4.1 from 4.0 our TeamCity build suddenly stopped working.  Actually it was working but won’t stop working.  The build would get hang after rebuilding out solution to create the IPA file.

The step in question looked like:

Solution Runner That Hangs

The TeamCity logs looked like:

[09:23:28][Foo\Foo.iOS\Foo.iOS.csproj] _SayGoodbye
[09:23:28][_SayGoodbye] SayGoodbye
[09:23:28][SayGoodbye] Compute signature for bin\iPhone\Release\

The build would also hang if I logged into the build machine and ran the msbuild via the command line.  However, the build would not hang if built via Visual Studio.

The error only occurs when creating the IPA file.  If compiling non-IPA project, even a iOS project that doesn’t create a IPA, everything works as expected and msbuild ends when it should

Fixing the problem involved telling msbuild to quit once it’s done.  You can do this by setting and environment variable and/or msbuild arguments.  I did both because why not.  The environment variable should be set like:


The command switch in question is:

msbuild YourApp.sln /m:4 /nr:false /t:rebuild

The /nr switch tells msbuild to quite once it’s done.  The /m switch tells how many cores to use.  This actually won’t help with the issue but it does speed up my build a bit.

To read more about the above fixes see these Stackoverflow links:

In TeamCity I tried adding the environment variable as a environment property but that didn’t work.  Adding the /nr switch as a parameter to the Solution Runner also didn’t work.  I had to create command line build step as shown below.

Command Line Build Step

The script that is cut off looks like:

"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" YouApp.sln /m:4 /nr:false /t:rebuild /p:Configuration=Release /p:Platform=iPhone /p:ServerAddress=%MacIP% /p:ServerUser=%MacUser% /p:ServerPassword=%MacPassword% /p:ContinueOnDisconnected=false

By the time you read this this issue will hopefully be resolved but maybe someone will find the above helpful.  That or it’s just me experiencing it due to some weird configuration issue.

P.S. – Xamarin 4.1 also moved and renamed the where the IPA gets created and this will also break you build scripts.  The IP is now created in a time-stamped folder just to make it more of a challenge for your script.  You can read more about it:

Again hopefully this will be fixed the IPA file created in a non-time-stamped location.

Update (August 16th, 2016):

The problem of MSBuild not ending was fixed in the latest Xamarin for Visual Studio release ( so it’s no longer an issue.  Ignore my above blog post.

That said  my above solution didn’t fully fix the problem.   What I ended up doing was creating a PowerShell script to kill MSBuild.  In TeamCity after the compile step create a PowerShell build step with the following script:

Stop-Process -processname msbuild

This build step is no longer needed but I include it here for completeness sake.

Posted in Code Examples, Software Development | Tagged , , , | Comments Off on Fixing MSBuild not Exiting

What Would Goal Buddy Say – Part II

I have been mastering small (and some medium-sized) goals, like working out every other day, purchasing a study manual for the APCAT (the written entrance exam for EPS), volunteering twice weekly at the John Howard Society, and driving around with a tiny police cruiser perched on my dash (for good luck, of course), to name a few. Committing to do each one of those is far easier than declaring, “I want to be a police officer,” and then feeling hopelessly lost and overwhelmed because the entire endeavour is so daunting that one might not know where to start.

Part of what makes Goal Buddy unique is that it encourages the achievement of large goals through starting with small and achievable ones. Things that you might accomplish in a week (or an hour, even), but help build patterns of behaviour amenable to the achievement of grander goals.

But what happens if you get stuck? The Saturday Morning Productions crew pondered this quandary. Would a reminder on your phone help? What if you kept missing the goal? Should you abandon it, modify it, or change the timeline? I’m not sure that there is a clear answer to that yet, because there are many reasons why one might miss a deadline for achieving a goal. However, I do know that failure is a destructive feeling that one might experience if a goal is missed.

It’s been a while since I’ve written a detailed blog post (writing them frequently is a goal of mine). I must confess that my head has been elsewhere, namely, due to factors I erroneously thought were beyond my control. Over the last few weeks, I’ve struggled to meet my goals (as outlined above) due to a situation elsewhere. It was like trying to swim while wearing leg irons. I wondered if leaving or staying in that situation would negatively affect my end goal (i.e., Would I get a bad reference if I left? Would I be seen as a quitter?). I indeed wondered what Goal Buddy would say.

Ultimately, after much thought and consultation with close friends, I knew that staying would be a huge hindrance and I opted to remove myself voluntarily from aforementioned situation. While there were many aspects of the situation that I could not influence, there was one variable over which I had complete control: my own choices. Modifying the timeline or nature of a goal is not failure. It is merely a reconfiguration of factors to set yourself up for success.

Things, my friends, are looking up!

Posted in Fun, Goal App | Comments Off on What Would Goal Buddy Say – Part II

Best Productivity Article

As we continue to work on Goal Buddy I’ve been reading books and research papers about goal setting and its cousin productivity.  Productivity is just a fancy word for saying “get stuff done”.

Some interesting articles/podcasts about productivity I recently read/listened to are:

Freaknomics: How to be More Productive

Joshua Kennon: The Secrets of Highly Productive People

However, these articles don’t hold a candle to this best article about productivity.  Be warned that reading this article will shake you to your core.  You will re-think how you approach work and view your co-workers in a different light.  Make sure you are sitting down.

The Onion: Study Finds Working At Work Improves Productivity

Yes it’s The Onion.  You know the joke website but it’s still a good read and sums up everything else in other articles about getting stuff done.  So quit reading this and get back to work.


Posted in Business Side, Fun, Goal App | Comments Off on Best Productivity Article

What Would Goal Buddy Say?

Support can make or break a goal. When we circulated a survey several months ago, asking the general public how (and if) they would use an app to help them achieve a goal, a large number of respondents indicated that lack of support was a primary reason that they had not met goals in the past. Support often comes from an external source – another human being close to you, typically – but powerful support also exists in electronic guises like social media platforms, forums, online discussion groups, and in apps.

Indeed, our own Goal Buddy app is intended to fulfill a support role for the user, lending motivation in a friendly but non-intrusive way. Like a friend would. The entire Saturday Morning Productions team has asked itself, when faced with a challenge, a conundrum, or a goal:

What would Goal Buddy say?

How can we make Goal Buddy’s “voice” (for lack of a better term) human? More importantly, how can GB’s communication with the user be tailored so that its messages are effective and welcome? Moreover, how can we strike the right tone? Some of us respond to drill sergeant-type orders, and others need less militaristic encouragement. Neither way is right or wrong, but it isn’t always easy to know which voice people (or oneself, for that matter) people respond to.

We thought about it this way: what would you say to a friend who had embarked on a grand journey towards a significant goal (one that, like virtually all huge goals) consisted of many smaller pieces? I would do my best to be kind, positive, and patient – all the qualities I value in my friends – but, at the same time, if my friend kept not doing what they say they wanted to do, I would ask them if that is indeed what they want. We all miss doing things from time to time (like if you get sick and can’t go for your daily run, for example), but if skipping out on things becomes a pattern, it may be time to reexamine the situation.

My own goal situation – the goal of joining EPS – has become a bit of a case study for Goal Buddy’s development (which is flattering and cool – I’ve never been a case study before!), and is timely because such a significant goal is inevitably comprised of many small hurdles that must be cleared before the giant, final, hurdle is conquered. It’s made a world of difference knowing that someone expects me to be at the gym every other day, but there are other things that don’t have an audience. Like studying for the entrance exams, keeping on top of current events, and remembering to keep a positive inner dialogue going. Sometimes, when a current of self-doubt slips into my mind, I ask myself: what would Goal Buddy say?

Posted in Fun, Goal App | Comments Off on What Would Goal Buddy Say?

The Scary Sun and Other Things


The very first Splash Screen. That sun can see dead people.

The very first Splash Screen. That sun can see dead people.

I spent the better part of last Sunday doodling on an ancient version of Photoshop (ver. 5.5, but I’m dating myself), working on the welcome screen for our Goal Buddy App. I laboured over rolling green hills (going to town with the ‘gradient’ tool), soaring mountains (gradient!) and ethereal blue sky (gradient!). It’s the first serious version of the splash screen yet, and I wouldn’t argue that the previous version was a strange three-way mix of scary, hilarious and creepy.

The previous version had “Creepy Sun” right in the middle of a painfully blue screen. The sun itself had a demented, crooked smile, and two eyes that didn’t quite point in the same direction. I think Chris named it “Creepy Sun.” In my own defense, it is really hard to draw with a mouse!

I was thinking about Creepy Sun the last time I was at the gym. I was dangling from the chin-up bar like a wounded orangutan. No matter which muscles I flexed, I couldn’t raise myself up. I’m really good at

The next version. 90% less creepy and 30% more inspirational.

The next version. 90% less creepy and 30% more inspirational.

the “down” part of chin-ups, though. I’ve got that down pat. I started to think, as I was hanging there, that I am still at the Creepy Sun stage of this whole law enforcement endeavour. I’m definitely sticking to the small goals I’ve set (i.e., exercise, studying for entrance exams, wearing aviator sunglasses every time I drive), but there is still a long road ahead. Just like designing the splash screen and other graphics for Goal Buddy, there will be many iterations and I don’t know quite how the end product will look, but stick with me and we will find out!

Posted in Fun, Goal App | Comments Off on The Scary Sun and Other Things