Fixing Google Chrome 39 update error: Update failed (error: 7)

When updating Google Chrome 39 64 bit on Windows 8.1 I was getting the error:

Update failed (error: 7) An error occurred while checking for updates: Google Chrome or Google Chrome Frame cannot be updated due to inconsistent Google Update Group Policy settings. Use the Group Policy Editor to set the update policy override for the Google Chrome Binaries application and try again; see for details.


To solve this problem:

  • Close all Google Chrome instances
  • Start > Run > regedit
  • Find and open HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update\

If you have the following values listed under the above key then all attempts to update Google Chrome and/or Google Chrome Frame will fail:

  • Update{8A69D345-D564-463C-AFF1-A69D9E530F96}
  • Update{8BA986DA-5100-405E-AA35-86F34A02ACBF}

In my case it was only: Update{8A69D345-D564-463C-AFF1-A69D9E530F96}

After removing this registry key and restarting Google Chrome I was able to update to Chrome 40

How to fix: No gulp tasks found by the Task Runner Explorer in Visual Studio 2013

The Task Runner Explorer extension for Microsoft Visual Studio 2013 found the gulpfile.js in my project, but the task in that file where not listed, just beneath the gulpfile.js, (No tasks found) was displayed, this was caused by missing dependencies.



To fix this:

Just open a command prompt.

Change directory to the folder containing the file “gulpfile.js”

Then enter: npm install

All dependency for gulp should be installed, now when you op the project in Visual Studio 2013 the tasks should be shown.



How to rename an user in Active Directory with C#


If you want to rename an user in Active Directory by using C#, you can use the following code:

using System;
using System.Collections.Generic;
using System.DirectoryServices;
using System.DirectoryServices.AccountManagement;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
    class Program
        static void Main(string[] args)
                Console.WriteLine("This application will rename a user in active directory.");

                Console.WriteLine("Enter domain:");
                string domain = Console.ReadLine();

                Console.WriteLine("Connecting to domaincontroller.");
                using (PrincipalContext context = new PrincipalContext(ContextType.Domain, domain))
                    if (context == null)
                        throw new ApplicationException("Domain not found.");

                    Console.WriteLine("Enter current username (e.g. john):");
                    string currentUserName = Console.ReadLine();
                    using (UserPrincipal user = UserPrincipal.FindByIdentity(context, currentUserName))
                        if (user == null)
                            throw new ApplicationException("User not found.");

                        Console.WriteLine("Enter new username (e.g. john2):");
                        string newUserName = Console.ReadLine();

                        using (DirectoryEntry entry = (DirectoryEntry)user.GetUnderlyingObject())
                            Console.WriteLine("Setting account properties in active directory.");
                            entry.InvokeSet("uid", newUserName);
                            entry.InvokeSet("sAMAccountName", newUserName);
                            entry.InvokeSet("userPrincipalName", string.Format("{0}@{1}", newUserName, domain));

                            Console.WriteLine("Rename common-name (CN).");
                            entry.Rename("CN=" + newUserName);

                            Console.WriteLine("User successfully renamed.");
            catch (Exception ex)
            Console.WriteLine("Press enter to continue...");

Using a custom AngularJS validation directive to validate an entered text in a kendo combo box.

See the plunker for the code:


When no text is entered, the kendo combo box should be invalid:



When a text is entered, that does not match a valid entry, the kendo combo box should be invalid:




When a text is entered, that does match a valid entry, the kendo combo box should be valid and the selected person should be shown: