Unorthodox configuration: How to use VLK and Click-to-run Office Apps side-by-side (Visio and Office 2016 as an example)

Ever had issues with different versions of Office programs not living in harmony together? Me too! This post describes how I was able to fix the issue and get Visio and Office 2016 of different installation types to play well together.

Preface

This blog post was inspired by my need to have Office 365 ProPlus (2016 versions) and Visio running side-by-side on my laptop. That turned out to be a lot more complicated than it arguably should be, so I documented the steps for further use. These instructions are written for that particular scenario (installing MS Visio on a machine with pre-existing Office 2016/365 ProPlus installation). My laptop is running Windows 10 Enterprise, which probably caused one of the issues I ran into.

Let’s get started!  Continue reading

Preventing Outlook (and other programs) from stealing focus

This post describes how to stop Windows applications from stealing focus from each other. In a practical sense, no piece of software should be able to “jump” to the top and activate your cursor in it, after the steps in this blog post have been applied.

Description

After some recent batch of Windows updates my Outlook desktop client started stealing focus whenever there was a new email coming in. Like most people, I get a lot of email, and after a while my humor completely ran out with Outlook jumping in, stealing my keystrokes and doing whatever those keystrokes were bound to in Outlook. Continue reading

Using Dispatcher to update values in GUI elements from a background thread

System.InvalidOperationException'

Quick tip:
If you’re developing something like a WPF app and you’ll need to update values on the User Interface based on a long-running operation that runs in a background thread (like depicted here), you’ll probably need to use Dispatcher, or otherwise you’ll run into issues with the GUI elements being owned by another thread, and therefore forbidding access to them. This can result in an error like this:

Luckily, there’s a quick workaround available. Read on!

Cue the Dispatcher

Continue reading

Attaching the Visual Studio debugger to the right IIS worker process

Visual Studio's Attach to Process -dialog

Every now and then comes the time when you’d actually need to debug something, and then you’ll likely be using your Visual Studio to attach the debugger to one or more processes.

Using CKSDev to attach to all IIS worker processes (w3wp.exe), or if you don’t use CKSDev, just pressing ctrl+p and selecting the processes from the list, is often a good enough solution. However, sometimes that makes your dev box sluggish, or maybe catches exceptions from code you’re not wishing to debug at the time, and it’d be handier to just attach to the one process you actually need. But how to find out the right one? Chances are, you’ll be having 3-6 w3wp processes, and you can only deduce so much from the process id…

Solution

Continue reading

Troubleshooting guide for Windows hosts -file

This post describes how to fix possible issues with Windows hosts-file.

Opening the hosts -file

First of all, hosts file location is usually: C:\Windows\System32\drivers\etc\hosts (link may or may not work depending on your security settings and browser version, but you can always copy-paste it to your text editor.

Editing hosts-file requires elevated privileges for the text editor process, so you’ll need to run it as an administrator.

Continue reading