Windows Defender after being Disabled gives “This Program has been turned off” on startup

I kept getting this very annoying message on startup."This program has been turned off". Well, yeah. I turned you off. Why do you need to tell me?

Well, like a bad girlfriend who stalks you, you want to find a way to get rid of her.

image

It turns out in my case, the stupid thing was being launched still on run.

Here are the simple steps, lifted from a friendly MS forum by Dalv49. (Gotta give props)

1. Launch regedit (Win+R, type "regedit", hit return)

2. Locate the Key HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRun

3. Delete Value "Windows Defender"

note: could be a good idea to check "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun" as well

image

You can also just run MSConfig. My favorite handy startup killer. Less work. Point and click.

Happy Coding!, errr. Disabling.

How to Convert a PDF to Black and White in Adobe Acrobat Pro

You sometimes want your PDF to be in GreyScale or black and white as it were. It can make it look more uniform, or if you had a flaky scanned document and the color looks off.

 

Anyway, it is quite easy to convert a document to Black and White in Acrobat Pro 9.

1) Open document. Duh.

2) Click Window –> Preproduction –> PreFlight

3) CLick the down arrow under PDF Fixups.

4) CLick the Convert to grayscal row/option.

5) CLick Analyze and Fix(bottom right hand corner).

6) Pick new filename. Voila! You are done.

SNAGHTMLb1e7de63

Happy coding…err..converting?

How To Fix: Windows Update Blocked by Group Policy

Problem: I cannot check for updates, it says “Some settings are managed by your system administrator”

Solution:

So, you can’t get windows update because some yahoo in IT blocked your access, eh?

First, type gpedit.msc in run,
In the window drill down User configuration>administrative templates>windows components>windows Update. In the right pane double click on remove access to access all windows update features and make it disabled.

If that doesn’t work, change the following key:

Disable and remove links to Windows Update

(User ConfigurationAdministrativeTemplatesStart Menu & Taskbar)
NoWindowsUpdate

(HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer)

There are a few other keys and settings that could affect it.

Check this link out for all the registry locations for Group Policy.

Lotus Notes JVM Terminated Error=8096

We all know Lotus Notes is a big pile of crap. Well, I kept getting this lovely error JVM Terminated Error=8096 after a power failure.

Good times.

It turns out, that after much head banging, simply blowing out your TEMP folder will fix it.

Just open your TEMP folder and delete the folder called XPDPLAT.

You will then be on your way.

Easy way to get there: Type %TEMP% into your Explorer and hit ENTER.
Happy Coding!

How to fix the McAfee SVCHOST crash from the virus definition update

I was able to fix the virus definition debacle McAfee that is hosing a bunch of people.

It turns out, that they put in a bad signature that quarantines your SVCHOST.exe which could cause your explorer to crash. Good times, right?

So, the fix is pretty easy:

1 Restart into safe mode with networking

2 open a Command window. If your explorer isn't started, hit CTRL - ALT - DEL  and hit Task Manager. Hit File, run. CMD.EXE and enter.

3) type DEL C:Program FilesCommon FilesMcAfeeEngineavvscan.dat

4 type cd c:windowssystem32dllcache

5 type copy SvcHost.exe ..

6 Restart your PC. You are good to go!

NOTE: If you need help getting into safe mode, click here. Or, pull the power cord during the boot after seeing the LOGO. Then boot normal, which will give the boot mode option screen. Pick Safe Mode with Networking (Without networking, you can’t use your cached domain account).
Happy Coding!

How to read the Distributed Transaction Coordinator settings from C#…

I wrote a nice helper utility class for reading the settings from the MSDTC in .NET.  My WCF service requires distributed transactions, so I want to make sure my server was able detect if it was on. If its not, I throw an error and shutdown.

So, here is the class for your pleasure.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
using System.Threading;

namespace SeekfordsNamespace
{
    /// <summary>
    /// Used to get the DTC settings on a machine
    /// </summary>
    internal static class DTCUtility
    {
        /// <summary>
        /// Reads the DTC settings.
        /// </summary>
        /// <returns></returns>
        public static DTCSettings ReadDTCSettings()
        {
            //Lets grab the DTC settings from the registry and then populate our entity
            try
            {
                //we work from the local machine key
                var localReg = Registry.LocalMachine;
                //set the root dtc key
                string rootKey = @"SoftwareMicrosoftMSDTC";
                string securityKey = rootKey +@"Security";
                var dtcReg = localReg.OpenSubKey(rootKey, false);
                var securityReg = localReg.OpenSubKey(securityKey, false);

                DTCSettings settings = new DTCSettings();
                try
                {
                    //is network dtc access even turned on at all
                    settings.NetworkDTCAccess = ((int)securityReg.GetValue("NetworkDtcAccess", 0)) == 1;
                    //default to false, then prove it is on.
                    settings.AllowInbound = false;
                    settings.AllowOutbound = false;
                    //check to see if network access is on at all and transactions allowed
                    if (settings.NetworkDTCAccess &&
                        (((int)securityReg.GetValue("NetworkDtcAccessTransactions", 0)) == 1))
                    {
                        //so we can talk to network, can we allow outbound?
                        if (settings.NetworkDTCAccess &&
                        (((int)securityReg.GetValue("NetworkDtcAccessOutbound", 0)) == 1))
                        {
                            settings.AllowOutbound = true;
                        }
                        //same as above, but inbound connections allowed
                        if (settings.NetworkDTCAccess &&
                        (((int)securityReg.GetValue("NetworkDtcAccessInbound", 0)) == 1))
                        {
                            settings.AllowInbound = true;
                        }
                    }
                    //grab authentication values
                    bool allowOnlySecureRPCCalls = (int)dtcReg.GetValue(@"AllowOnlySecureRpcCalls", 0) == 1;
                    bool fallbackToUnsecuredRPC = (int)dtcReg.GetValue(@"FallbackToUnsecureRPCIfNecessary", 0) == 1;
                    bool turnOffRpcSecurity = (int)dtcReg.GetValue(@"TurnOffRpcSecurity", 0) == 1;
                    //process the logic to determine which mode is active.
                    settings.MutualAuthenticationRequired = (allowOnlySecureRPCCalls && !fallbackToUnsecuredRPC && !turnOffRpcSecurity);
                    settings.IncomingCallerAuthenticationRequired = (!allowOnlySecureRPCCalls && fallbackToUnsecuredRPC && !turnOffRpcSecurity);
                    settings.NoAuthenticationRequired = (!allowOnlySecureRPCCalls && !fallbackToUnsecuredRPC && turnOffRpcSecurity);

                }
                finally
                {
                    try
                    {
                        //close but not a failure if there is an error
                        dtcReg.Close();
                        securityReg.Close();
                    }
                    catch { }
                }
                return settings  ;
            }
            catch
            {
                return null;
            }
        }

    }

    /// <summary>
    /// DTC Settings
    /// </summary>
    internal class DTCSettings
    {
        /// <summary>
        /// Determines whether DTC on the local computer is allowed to access the network.
        /// This setting must be enabled in combination with one of the other settings to
        /// enable network DTC transactions.
        /// </summary>
        /// <value><c>true</c> if [network DTC access]; otherwise, <c>false</c>.</value>
        public bool NetworkDTCAccess { get; set; }
        /// <summary>
        /// Allows a distributed transaction that originates from a remote computer to run on this computer.
        /// Default setting: Off
        /// </summary>
        /// <value><c>true</c> if [allow inbound]; otherwise, <c>false</c>.</value>
        public bool AllowInbound { get; set; }
        /// <summary>
        /// Allows the local computer to initiate a transaction and run it on a remote computer.
        /// </summary>
        /// <value><c>true</c> if [allow outbound]; otherwise, <c>false</c>.</value>
        public bool AllowOutbound { get; set; }
        /// <summary>
        /// Adds support for mutual authentication in future versions and is the highest secured
        /// communication mode. In the current versions of Windows and Windows Server, it is
        /// functionally equivalent to the Incoming Caller Authentication Required setting.
        /// This is the recommended transaction mode for clients running Windows XP SP2 and
        /// servers running a member of the Windows Server 2003 family.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if [mutual authentication required]; otherwise, <c>false</c>.
        /// </value>
        public bool MutualAuthenticationRequired { get; set; }
        /// <summary>
        /// Requires the local DTC to communicate with a remote DTC using only encrypted messages
        /// and mutual authentication. This setting is recommended for servers running Windows Server
        /// 2003 that are operating in a cluster.
        /// Only Windows Server 2003 and Windows XP SP2 support this feature, so you should only use
        /// this if you know that the DTC on the remote computer runs either the Windows Server 2003
        /// or Windows XP SP2 operating system.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if [incoming caller authentication required]; otherwise, <c>false</c>.
        /// </value>
        public bool IncomingCallerAuthenticationRequired { get; set; }
        /// <summary>
        /// Provides system compatibility between previous versions of the Windows operating system.
        /// When enabled, communication on the network between DTCs can fall back to a non-authentication
        /// or non-encrypted communication if a secure communication channel cannot be established.
        /// This setting should be used if the DTC on the remote computer runs a Windows 2000 operating system
        /// or a Windows XP operating system earlier than SP2. This setting is also useful when the DTCs
        /// that are involved are located on computers that are in domains that do not have an established
        /// trust relationship or if the computers are part of a Windows workgroup.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if [no authentication required]; otherwise, <c>false</c>.
        /// </value>
        public bool NoAuthenticationRequired { get; set; }

        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override string ToString()
        {
            StringBuilder state = new StringBuilder();
            state.AppendFormat("NetworkDTCAccess: {0}rn", NetworkDTCAccess);
            state.AppendFormat("AllowInbound: {0}rn", AllowInbound);
            state.AppendFormat("AllowOutbound: {0}rn", AllowOutbound);
            state.AppendFormat("MutualAuthenticationRequired: {0}rn", MutualAuthenticationRequired);
            state.AppendFormat("IncomingCallerAuthenticationRequired: {0}rn", IncomingCallerAuthenticationRequired);
            state.AppendFormat("NoAuthenticationRequired: {0}rn", NoAuthenticationRequired);
            return state.ToString();
        }

    }

}

Happy coding!

How to make your own SSL test certificate for IIS or WCF

I had to create a test ssl certificate to use with my WCF service.

Here is the simple way to do it in 2 Easy Steps!

1) Open the Visual Studio 2008 Command Prompt

2) Fire off this command. change bseekford00111 to your computer name or whatever name you want the certificate to be.

makecert -r -pe -n "CN=bseekford00111" -b 01/01/2000 -e 01/01/2050 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr CurrentUser -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

That is all there is to it.
It will drop it in the current user MY store. If you want it under local machine store, change CurrentUser to LocalMachine

Really cool and free screen shot clipping tool. How handy!

I imagine everyone writing on the web or developing software needs to do a screen shot every once in a while. I also don’t want to pay $30 for something I only use every once in a while. So I ran across this cool project from CodePlex.

It is called Cropper. http://cropper.codeplex.com/

You can give it a shot. It’s free and it works. It drops the area of the screen you pick to the disk or clipboard in the format of your choice.

Share the knowledge, as knowledge is freedom!