Category: Windows

No OneDrive

Removing the OneDrive folder from your Desktop in File Explorer

I don’t use OneDrive at all – I have a DropBox account I’ve very happy with – so I uninstalled it from my Windows 10 machine using the commands:

taskkill /f /im OneDrive.exe
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall

Unfortunately this left behind a “OneDrive” folder in the tree in File Explorer, and most of the “solutions” on the internet don’t actually seem to solve it. I have managed to get rid of it though, so I thought I’d share the solution!

Read More

Network Cables

PowerShell behind a proxy server

Recently I’ve been trying to get some PowerShell deployment scripts working from behind a proxy server. There’s a lot of information all over the internet about this, but most of it does not apply if you don’t directly control the commands you want to execute, for example if your connections happen within a third party DLL. Normally for C# code you would solve this using an App.config or a Web.config, but obviously PowerShell doesn’t have this.

Read More

The Web

Microsoft’s WCF DataContractJsonSerializer sucks!

Anybody who has tried to write a RESTful JSON service in WCF will have hit a wall of hurt as soon as they try to do anything beyond returning a simple string. Enums don’t work how you would want (returning a string instead of the integer value), and error messages are still returned as either XML or (even worse) HTML.

There are some partial solutions online, particularly a great starting point provided by Jeroen Hildering on his blog post, however I found there were still a few further issues I wanted to solve.

Read More

Patch for JavaScript errors from the nav bar in CRM 2015 with Update 0.2

With the CRM 2015 on-premise update 0.2, Microsoft have introduced a bug with the navigation bar at the top of the page. The steps to reproduce it are:

  1. Hover over the top-level node, e.g. Sales, to bring up the second level navigation.
  2. Within the second level navigation, click on the downward pointing chevron next to an item, for example “Contacts”, to reveal the third level navigation showing the recently viewed items.
  3. Select one of the recent items.
  4. After the page has loaded, repeat from step 1.

As soon as you open the nav bar the second time a JavaScript error will occur, causing the whole navigation bar to become stuck on the page.

I have managed to identify the problem and have developed a simple patch for the JavaScript file in question.

Read More

Can’t browse media via the web interface when running TwonkyServer on port 80

You can’t browse media via the web interface if the Twonky Server, which usually runs on port 9000, is instead mapped to port 80. The view comes up empty, because the request fails due to some processing happening in the client JavaScript code.

Read More

Running uTorrent as a service on Windows

So I have recently set up my own Windows Server 2012 box to replace my old NAS. There was nothing wrong with the old box particularly, I just wanted a bit more control over it all, and I wanted to be able to run Plex, which the old box just wasn’t powerful enough to handle. One of the features of the NAS box was that it has a BitTorrent client, accessible via a web browser, and I was keen to replicate this functionality on my new set up.

The popular µTorrent client seemed like a good solution, as it includes a web-based user interface out of the box. Unfortunately, there is no built-in way to get it to run without being actually logged into the server at the time. The usual trick of setting up a scheduled task to run at start up unfortunately didn’t seem to work, and all of the guidance I could find on the internet suggested that I use the Windows Server 2003 Resource Kit to create a service, which unfortunately seems to be incompatible with Windows Server 2012!

So, in the end I gave in and came up with my own solution, and I thought I would write about it here in case it is of any use to anyone else trying to achieve the same thing.

Read More