Dirty code trick

Here is a really quick and dirty piece of code that lets you get a Console window almost anywhere. Say from inside a Windows-service(maybe hosting a WCF). Sometimes you really need to get some text output for debugging, maybe on an environment where you cant access the eventlogs. Then this trick is handy.

Small C# example below:

using System.Runtime.InteropServices;

[DllImport("kernel32.dll", SetLastError = true)]
static extern bool AllocConsole();

[DllImport("kernel32.dll", SetLastError = true)]
static extern bool FreeConsole();

Console.WriteLine(DateTime.Now.ToString() + " : Test Log");

Make sure to call AllocConsole() first.

When you are finished, simply call


OneDrive For Business The Next Generation – First Impressions

Been running the new client for a couple of days now. Works fine, much faster sync speed compared to the old ODFB.

I have two business accounts plus a OneDrive Personal.

In Explorer I get all three accounts in the “Quick access” – My second business account is named “Business2” in Explorer, in Word it got its real name “OneDrive – Naturvardsverket”.

Overall, working with ODFB is much more responsive now(I’m on a Win10 machine).

Here is a link the official ODFB NG(!) Blog 🙂

You get an OneDrive Icon per account, so it can be quit the collection:

onedrives Here you see my three accounts. So make sure you select the correct icon when you are making changes or unlinks the account.

Here you can see the dialog in Word:


// Lazze

OneDrive, but no ticker

If you, like me, have OneDrive Personal and Business on the same machine, chances are that the green ticker/check mark is missing. All files syncs just fine, but no green check mark.

I have found two solutions:



For me, the Reg Hack did it. I have a Win 10 box thats been upgraded from win 8.1 so I simple had to many overlay entries in the registry – even some SkyDrive entries that I had to delete.

// Lazze


1 2