Windows 10: Disable Windows Defender

Windows Defender is the anti-malware built into Windows 10 and available as a download for previous versions of Windows.  Unfortunately, in Windows 10 you’re not able to disable Windows Defender permanently.  If  you disable it, it will turn itself back on after some time.

WindowsDefender1Well, I’m all about choice.  That and not having absurd CPU usage after a Windows Defender update rolls through town.  And it turns out that you can disable Windows Defender, just not with a pretty UI.

NOTE:  The Local Group Policy Editor (method #1) is not available with Windows 10 Home.  I’m not sure if method #2 works on Windows 10 Home or not.

Method #1:  edit your local group policy to disable Windows Defender.  Run the Local Group Policy Editor by typing gpedit.msc in the search bar.  Choose the Edit Group Policy option that appears.

WindowsDefender2Local Group Policy Editor will open.

WindowsDefender3Navigate the menu on the left hand side; Computer Configuration -> Administrative Templates -> Windows Components -> Windows Defender.

WindowsDefender4On the right hand side there’s the selection Turn off Windows Defender.  Double click that option to change it.WindowsDefender5Choose Disabled and click OK.  You’ll have to reboot for the changes to take effect.

Method #2:  modify the registry to disable Windows Defender.  Run the Registry Editor by typing regedit.msc into the search bar.  Choose the regedit option that appears.

WindowsDefender6The Registry Editor will open.

WindowsDefender7Using the menu in the left pane, navigate to HKEY_LOCAL_MACHINE (aka HKLM) -> SOFTWARE -> Policies -> Microsoft -> Windows Defender.

WindowsDefender8Double click the DisableAntiSpyware entry in the right hand pane to edit it.

WindowsUpdateTroubleshooter8Entering a 1 for this value disables Windows Defender; entering a 0 in this key (the default value) allows Windows Defender to execute.

Click OK, close Registry Editor, and reboot to see the changes.

Posted in Windows 10 | Leave a comment

Windows 10: No, Really, Don’t Install That Update

So I thought my last post on turning off device driver updates was good, until today when I arrived home to find my PC with only one working monitor.  The nVidia display driver from Windows Update had been installed.  Again.  For the fourth time.

WindowsUpdateTroubleshooter7Well, some digging turned up an answer on how to deal with this problem.

First, install the drivers as you want them.  (Or, if dealing with another update, remove them from the system by using View Installed Updates – Control Panel.)  Second, use KB3073930 to download a “Show or hide updates troubleshooter.”  (Er, wait, that’s exactly what everyone’s been asking for Microsoft to add to the primary UI.)

WindowsUpdateTroubleshooter1Click Next to start the process.

WindowsUpdateTroubleshooter2The Searching for updates… step took a bit.

WindowsUpdateTroubleshooter3Here you’re given the choice to either hide or show hidden updates.  Each does as you would expect.  In my case, I want to hide an update.

WindowsUpdateTroubleshooter4A list of possible updates to be hidden are shown on this screen.  This is why it’s important to uninstall the update from your PC prior to running the troubleshooter – if the update is still listed as installed, it won’t be shown for selection.

Choose the update you wish to hide and click next.

WindowsUpdateTroubleshooter5The final screen shows the update and fixed; checking Windows Update results in the update not being shown for installation.  Our goal has been realized.

WindowsUpdateTroubleshooter6The catch?  You have to know the update is waiting for installation to prevent it from being installed.  This means in the case of most device drivers, you’re going to have the undesired driver installed at least once.

Hopefully Microsoft will make Windows Update honor the Device Installation Settings.  This problem may very well be because Windows 10 is still in beta, and they want all updates push to all PCs.  I don’t have a lot of hope that’s the case, though.

Posted in Windows 10 | Leave a comment

Windows 10: Turning Off Hardware Driver Updates

I received a set of updates from Windows Update yesterday, and with them came a very unwanted update:  the Microsoft nVidia driver.  While this driver is officially provided by nVidia to Microsoft, it turns off secondary monitors, disables GeForce experience, and overall is never an acceptable update.

I don’t think any driver update is.

Unfortunately, you can’t disable one piece of hardware or another.  You have to turn off drivers from Windows Update completely if you don’t want to receive them.

To disable driver updates, start by opening up System Properties.  You can do this by typing in system settings (which should translate into View Advanced System Settings) into the search bar or by right clicking This PC, choosing Properties from the pop up menu, and Advanced System Settings in the left hand menu.

Click on the Hardware tab.

Click on Device Installation Settings.

Select No, let me choose what to do and Never install driver software from Windows Update.  Click Save Changes.

If you have any pending updates waiting for installation, they will still install.  This only affects future updates during the selection process.

Posted in Windows 10 | Leave a comment

Checking In.

I’ve been reassigned at work to a different project using XML/XSLT/XSD.  Not as exciting, certainly content not as postworthy.  I’ve found a few things I’d like to post about and will get around to as soon as things slow down a bit.

 

Posted in schkerke.com | Leave a comment

Team Foundation Server 2015: Connecting to a Repository and List Collections

Previous Posts:
Team Foundation Server 2015: Integration and Extension

You can find an architectural overview of Team Foundation Server on MSDN if you’re curious.  I personally find that the architecture and object model don’t correlate clearly, so we’re going to create our own diagram.

At this point in my desire to understand the programmatic model, Team Foundation Server consists of Collections, Projects, Branches, Work Items, and Change Sets.  There’s far more than that available, of course.

TFS_Simple_OM

The first class of interest to us is TfsConfigurationServer (Microsoft.TeamFoundation.Client namspace, Microsoft.TeamFoundation.Client.dll, v14.0.0.0 assembly).  There are two ways to retrieve an object of this class.  First, use the constructor with a Uri object.


Uri serverUri = new Uri("http://{TFS Uri}:{TFS Port}/tfs");
TfsConfigurationServer tfsServer = new TfsConfigurationServer(serverUri);

Second, use the TfsConfigurationServerFactory (Microsoft.TeamFoundation.Client namespace, Microsoft.TeamFoundation.Client.dll, v14.0.0.0 assembly) to retrieve an instance of the class:

Uri serverUri = new Uri("http://{TFS Uri}:{TFS Port}/tfs");
TfsConfigurationServer tfsServer = TfsConfigurationServerFactory.GetConfigurationServer(serverUri);

The difference between the two is that the factory will cache the object for you; subsequent calls to it with the same URI will result in the same object being returned to your code.

Now we’re connected, although authentication doesn’t happen until you make a call against the object (use TfsConfigurationServer.EnsureAuthenticated() if you want to verify this prior to processing).  How do we list the collections held by this TFS instance?

If you look at the MSDN definition for TfsConfigurationServer, there doesn’t appear to be any methods which will return collection information.  The data we’re looking for is actually held by a property, CatalogNode (Microsoft.TeamFoundation.Framework.Client namespace, Microsoft.TeamFoundation.Framework.Client.dll, v14.0.0.0 assembly).

ReadOnlyCollection<CatalogNode> tpcNodes = tfsServer.CatalogNode.QueryChildren(
     new Guid[] { CatalogResourceTypes.ProjectCollection },
     false,
     CatalogQueryOptions.None);

The CatalogNode property is Microsoft’s method of abstracting away the differences between objects held within the TFS object hierarchy.  Each CatalogNode has a CatalogResource (Microsoft.TeamFoundation.Framework.Client namespace, Microsoft.TeamFoundation.Framework.Client.dll, v14.0.0.0 assembly) associated with it.  This CatalogResource represents the actual catalog item.  The CatalogNode is used to store relationship data.

Off of the CatalogNode property we’ll find a QueryChildren method.  This is what we use to find the objects that we want.  There are two overloads to the method; we’ll cover QueryChildren(IEnumerable<Guid>, bool, CatalogQueryOptions).  The second overload I’ve been unable to find a sample for, and am unsure how to provide arguments to.

The first argument to QueryChildren represents the CatalogResourceTypes (Microsoft.TeamFoundation.Framework.Common, Microsoft.TeamFoundation.Framework.Common.dll, v14.0.0.0 assembly) you want to have returned.  It’s an array of Guids because it is not an enumeration; the values used represent static values on the CatalogResourceTypes class.  You’ll most often see the array created inline with the function call.

The second argument to QueryChildren indicates whether or not you want the search algorithm to search recursively for the object types you’ve indicated.  While this makes little sense for an enumeration of collections, you’ll find the catalog used throughout the API – recursively searching for work items makes more sense.

The final argument to QueryChildren is a CatalogQueryOptions enumerated flags value (Microsoft.TeamFoundation.Framework.Common, Microsoft.TeamFoundation.Framework.Common.dll, v14.0.0.0 assembly) indicates whether you want additional data prepopulated on the result set.  There are three options:  ExpandDependencies, IncludeParents, and none.

A final note on the return value of QueryChildren.  ReadOnlyCollection is a generic based collection found in System.Collections.ObjectModel.  Why is it in System.Collections.ObjectModel?  See here.

Once we have the results from the server we use the Resource property on the CatalogNode to access the object data we want.


List rValue<string> = new List<string>();
foreach (CatalogNode tpcNode in tpcNodes)
     rValue.Add(tpcNode.Resource.DisplayName);

return rValue;

Complete listing:


using Microsoft.TeamFoundation.Framework.Common;
using Microsoft.TeamFoundation.Framework.Client;
using Microsoft.TeamFoundation.VersionControl.Client;
using Microsoft.TeamFoundation.Client;
 
public List<string> ListCollections()
{
     Uri serverUri = new Uri("http://{TFS Uri}:{TFS Port}/tfs");
     TfsConfigurationServer tfsServer = TfsConfigurationServerFactory.GetConfigurationServer(serverUri);

     ReadOnlyCollection<CatalogNode> tpcNodes = tfsServer.CatalogNode.QueryChildren(
          new Guid[] { CatalogResourceTypes.ProjectCollection },
          false,
          CatalogQueryOptions.None);

     List<string> rValue = new List<string>();

     foreach (CatalogNode tpcNode in tpcNodes)
          rValue.Add(tpcNode.Resource.DisplayName);

     return rValue;
}
Posted in Team Foundation Server 2015 | Leave a comment

Google Developers: PageSpeed Insights

Google may be viewed by many as a huge information gathering leech, but their contributions to various development efforts cannot be denied.  While they want to harvest the data on your site, they’re also willing to help you analyze and optimize that sight.  (In the end, a win for them – it takes less time to scrape your site.)

One such set of tools I recently found are the PageSpeed Tools.  All are aimed at dissecting your page and it’s load time and optimizing it.  schkerke.com does poorly, to put it mildly.  (52/100 for mobile, 66/100 for desktop)  Still both scores are better than my employer’s home page, a major US corporation, so there is that.

Posted in schkerke.com | Leave a comment

Team Foundation Server 2015: Integration and Extension

I’ve been tasked with creating a build process for our primary product at work, using Build vNext and Team Foundation Server 2015.  This is slightly ahead of the curve; Team Foundation Studio 2015 is only available as a release candidate.

The first objective was to identify the location of the reference assemblies.  Unlike previous iterations of Team Foundation Server and Visual Studio, the reference assemblies are no longer being placed in the GAC.  Instead, they can be found at

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

You’re looking for assemblies with the version 14.0.22821.0.  Microsoft has indicated that they plan to release a NuGet package with the assemblies when 2015 is RTMed (released to manufacturing).

Posted in Team Foundation Server 2015 | Leave a comment

H264 vs H265: A Transcoded Comparison

H.265, aka HEVC, is the successor to H.264.  H.265 is meant to double the compression rates of H.264, allowing for the propagation of 4K and 8K content over existing delivery systems.  Version 1 of the standard was finalized on January 25, 2013 and published by ISO/IEC on November 25, 2013.  Version 2 came about at the end of October, 2014.

VLC v2.2.0 and greater supports decoding of H.265.  ffmpeg currently supports H.265, but I couldn’t find an indication as to when that support was added.  HandBrake 0.10 supports H.265.  Because of the ffmpeg support for H.265, both Plex and Kodi support H.265 as well.  In short, at least in my personal tool stream, there was no reason not to explore using H.265.

So I did!

Some pertinent details:  the file I used as a source was 1280×536, 25 fps video, and 1536 kb/s audio and already encoded in H.264.  My primary purpose was to see 1) What real quality difference would come about from transcoding from H.264 to H.265?  And 2) What size difference would come about from transcoding from H.264 to H.265?

First, encoding with Handbrake with H.265 versus H.264 took about four times as long.  A 59:53 file took 30 minutes, 33 seconds to encode with H.265/Handbrake 0.10.2.7286 (64 bit).  That same file took 7 minutes, 30 seconds to encode with H.264/Handbrake 0.10.2.7286 (64 bit).

Both had my i5-4430 pegged at 100% the entire time at 50 fps (H.265) and 188 fps (H.264).   In comparison, my Linux box using Handbrake CLI was moving at a snail’s pace (16 fps) but the CPU maxed out at about 90% usage.

TranscodeCPUWindows

TranscodeCPULinux

TranscodeCPULinux2The difference here between the two systems was startling; my Linux box has an Athlon Phenom II X6 processor, older but still rated at 5699 CPU Marks.  My i5-4430 is certainly no beast and only comes in at 6295 CPU Marks.  (A comparison of their statistics.)  The Athlon was performing at a fraction of the i5.

A quick look didn’t show any GPU usage by Handbrake.  The hard drives’ throughput held no obvious bottlenecks either.

TranscodeDiskWindowsTranscodeDiskLinuxIn any case that’s a mystery we will leave for another day.  Back to H.265 versus H.264.

The original video:

OriginalVideoThe H.265 transcode:

H265VideoNow admittedly my eyesight is worse than most, and this doesn’t capture any possible motion artifacts (of which I saw none during the preview) but these two captures look identical to me.

What about the lauded size/compression?

The original video was 2.64GB, mostly due to its 1536kb/s audio.  Handbrake stripped this down to 507Mb with H.265, and 555Mb with H.264 by using AAC stereo at 160kb/s.  That’s a 9% difference in file size (between the two encodes) with near identical results.  Spread across 23TB of drive space that would be nearly 2TB of additional drive space.

Now, there is a very definitive downside to H.265.  It is CPU intensive to decode as well.  Check out the two VLC instances running in the screenshot below:

CPUUsageThe 13.6% VLC Player was responsible for playing the H.265 encode.  The 6.5% VLC Player was playing the original H.264 encode.  While the delta varied, the H.265 encode never went below the H.264 encode in CPU usage.

While the file size savings for H.265 are admirable, most of what I have will have to remain H.264 because of this CPU usage.  If the Plex transcoder consumes twice as much CPU to decode H.265 as H.264, I’ll only be able to support half of the streams I currently do – which is already at maximum.

As the algorithm and format matures (as H.264 did; I never realized before today that H.264 is 11 years old!) I’m sure we’ll get better at dealing with it.  Or upgrade our hardware.  One or the other is bound to happen.

Disclaimer:  I am no expert encoder and have only the barest knowledge of video and audio codecs and their impact on a file.  If I’ve missed something in this article please point it out to me – kindly, preferably.

Note:  The speed difference between my Windows box and my Linux box seems to be specific to Handbrake.  ffmpeg is translating at 66 fps with the same (or as near to the same as I can make them :)) settings.

Posted in Cord Cutting | Leave a comment