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.


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


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

Happy Coding!, errr. Disabling.

VS 2010: An error occurred loading a configuration file: Failed to map the path ‘/’.

I was using the System.Web.Configuration.WebConfiguration class to open the configuration for the site from one of my logic dll’s and I got the wonderful error An error occurred loading a configuration file: Failed to map the path ‘/’.

I freaked out for a second, until I put more thought into it. This is running fine in production! What is the difference with my machine and the server?

Oh! My Visual Studio is running under UAC with limited privileges since I am in Windows 7. DUH!

So, I restarted Visual Studio 2010 under “Run as Administrator” and problem solved. So if you are on Vista or Windows 7, that’s the issue.

NOTE: If you develop with administrative rights, be careful you don’t make development mistakes that assume everyone will run your program as an admin. i.e. writing to program files directory, root directory, etc.

Happy Coding!

regsvr32.exe registering your ActiveX (ocx) gives you error 0x80040200..yuck.

I design and work with a lot of c++ code and write a number of ActiveX controls. I set my machine up so I can double click the OCX and it is associated with regsvr32.exe, so it gets registered. Nice and easy, right? I have been doing it for years. Double click, whammo. It’s registered.

Now let’s come to the present. Happy go lucky , easy as pie, double click my way to registered controls, is gone. BAH! I upgraded to Windows 7, I knew this OS had to have a gotcha!

So I get regsvr32.exe blowing up and giving me error 0x80040200. That’s real helpful, doesn’t Microsoft speak any ENGLISH. So I go and look up that ridiculous error code, and lo and behold…wait for it….wait…….User Access Control. UAC said, go away child, you can’t play here.

The long and short of it, I typed cmd.exe into the run box on the start menu, right clicked cmd.exe when it appeared and did a runas for Administrator. I then did the old school command line register of the ocx. Sad.

When I get froggy enough, I will write a batch file that will have the always run as admin attributes on it so at least UAC can prompt me to elevate.

So in short, regsvr32 on Windows 7 with UAC. You must find a way to make regsvr32.exe run elevated as an Administrator for it to work.

Visual C++, Precompiled Headers and Windows 7

I upgraded to Windows 7 and I really am enjoying the new interface….but….. I went to compile my ActiveX toolset projects that are all written in C++ and I started getting  precompiled header errors.

So I rebuilt and rebuilt and still got the error:

Error    1    fatal error C1859: ‘.Release/HTTP Wizard.pch’ unexpected precompiled header error, simply rerunning the compiler might fix this problem    d:SSIC++v3HTTP Wizard v3HTTPAccess.cpp    5    HTTP Wizard

So I rebuilt and rebuilt. No avail. I turned off Precompiled headers and then everything worked fine. What a pain.

It turned out the reason is due to the virtual tables being rebased by Windows 7 for security which totally screws up the precompiled header logic, which requires the headers to be in the same memory locations.

Apparently the development team at Microsoft knows about the issue and will eventually fix it. So, lets hope that service pack comes out soon.

I guess I am lucky my build machine is really beefy, but for active development having the precompiled header is nice.

So, go have a Margarita and the  compiler errors won’t bother you as much…..

Windows 7, Cassini and Firefox run slow as molasses together…..

I have been developing on Windows 7 64-bit for a couple of weeks now and really like the Windows 7, but wow have my web applications run slow. I figured I would debug the issue later as maybe it was my data layer running slow. Each time I would execute a page refresh, load, navigate, whatever, it would take 2 seconds. Doesn’t seem like much, but when you click a button on a page 2 seconds is a very long time to watch it hang.

So, after getting sufficiently annoyed and impatient I was able to find that it was my app but was Firefox. Apparently Firefox has some sort of issue with IPv6.

The fix is amazingly simple.

  • In the address bar type ‘about:config’
  • Filter by ‘v6’
  • Disable ipv6 support.
Screenshot of option to disable/enable
Screenshot of option to disable/enable

Thanks to Peter Gregory for the help.

ASP.NET State server won’t start on Windows 7 64 bit. File is missing?

I went to launch my state server for ASP.NET to handle my local sites state information, in preparation for production, and the service just wouldn’t play nice. I tried to start it and it says the file doesn’t even exist.

Good times, right? So I went into the registry to see where it was pointing..%SystemRoot%Microsoft.NETFrameworkv2.0.50727aspnet_state.exe  (Yes, the path is visible on the service control properties as well)

I checked the disk and surprise surprise, it actually wasn’t there. However, there is this suspiciously obvious looking folder called Framework64. AHAH! You look in there and voila! It is in there.

Looks like the framework installer sucks. So I fixed the key and it magically started working. Amazing how when you point to the actual file it works,eh?

The fix is to change this:
key: ImagePath
to this:

Happy coding!

Windows 7 is officially bad ass…………

I got a virus on my Windows Vista machine that caused it to run slower than all holy hell. I decided, well, now must be the time to upgrade my OS. No one ever wants to go through the new OS nightmare of having to reinstall every program they use. Especially not a guy in the IT field that uses a whole lot more than just Office.

So, I went full out and put on Windows 7 64-bit. Oh yeah. I finally get all 4 gigs of my ram. I expected the OS to be pretty much Vista with a new name.

Luckily, its not. I have only had it installed for about a day now but I see all sorts of little changes that make my experience SOOOO much better.

The themes are really cool. The desktop background rotates a nice image  every hour or so. I definitely like the variety, but thats not my big happy change.

The UAC is a lot more friendly than it used to be. I like the prompts as it make me feel a bit in control, but in Vista I disabled UAC altogether because nothing worked when it was on. Windows 7, not a problem. I run Visual Studio 2008 and don’t have any of the Vista issues I had.

The biggest thing I found I like so far is the taskbar. I am not only able to “pin” my programs to it, which is a great timesaver, but I can pin my documents to the program as well. I open and close the same 4 documents all the time. Now, its easy to pop into the word icon and go right to my document. Great time saver.

The other major timesaver I use is the ability to see all the windows for a process when I click on the taskbar icon. It is so much easier to figure out what IE window I want to go to or explorer folder when I can see the image of it at a glance. 

Windows 7 gets my vote as a great new OS for productivity. Vista is a smelly pile of crap once you get used to the new Windows.