0.0.0.0 Gateway Causing No Internet Access

Sometime last week, I stopped being able to get access to the internet while at work.  I could get an IP address from DHCP, but couldn’t get any traffic past our firewall/gateway.

I thought it was DHCP server, and was ready to buy a new one as it is 5 years old.  But then I noticed in my ipconfig /all that I had two gateways:  0.0.0.0, and then on the second line, my correct gateway, 192.168.1.1.  I had never seen two gateways listed, and almost scanned right over it.

I confirmed that no matter if I set the IP manually, or dynamically, I couldn’t get rid of the 0.0.0.0 gateway.

I called my friend, the who knows all the technical nitty gritty in the TCP world.

We fired a command prompt and I printed my computer’s current route table by writing “route print”:

Route Print Before

You can clearly see the two lines showing 0.0.0.0.  According to him, there should only be one line.  So we deleted them both:

Route Delete

This left us at:

Route Print Middle

So then we added the correct one back in:

Route Add

I did one more “route print” to make sure it took:

Route Print After

And viola, I have internet access!

Delete Files Older Than Date Using Batch Files

This problem has nagged at me for years.  Here is a batch command to delete files on a Windows 2003 machine.

Forfiles -pC:\backup -s -m*.* -d-5 -c "cmd /c del /q @path"

This will delete all files in my backup directory older than 5 days. To test it first, use this:

Forfiles -pC:\backup -s -m*.* -d-5 -c "cmd /C Echo 0x22@Path\@File0x22"

This will print out each file that you will be deleting.

Now playing: Lamb Of GodTerror And Hubris In The House Of Frank Pollard

Deauthorize iTunes Before Reformatting

I added this to my Reinstall Windows Todo List, but felt I should devote one blog on it because of its importance.

To put it simply, iTunes allows you to play or “authorize” your music on up to 5 computers. If you reformat your machine before “deauthorizing” it, you waste one of those licenses.

As a developer that wipes his two machines every 6 – 15 months, you can eat up licenses quick. On this last install, I happened to stumble on this while looking at my account in iTunes and seeing that I had 5 computers authorized. Being as I should only have two I knew something was up. I sent apple a support request at 11 AM on a Saturday stating:

In my account it shows that I have 5 computers authorized on my account, however I only use two.

I am a developer, so I am wiping my machines every six months, so I am thinking that your software is counting each of my machines multiple times.

I have tried deauthorizing each machine multiple times, but it shows only one license per machine.

How can I fix this? Also, is there a way to just wipe all of my authorizations and start over?

In an act of fantastic customer service, at 1:45 PM they replied with:

For security reasons we generally do not perform this service. However, in this case we have made an exception. If you plan to sell or stop using a computer, be sure to deauthorize it before you no longer have access to it.

You may authorize five computers to play music purchased using your iTunes Music Store Account.

For specific instructions on how to authorize and deauthorize a computer to play your iTunes purchases please visit http://www.info.apple.com/kbnum/n93014.

You may also find help under the Help menu in iTunes.

Please be sure to deauthorize your computer before you sell it, give it to someone else, reformat it, or have it serviced. If you do not deauthorize the computer, it will continue to have one of your five authorizations attached to it.

Sincerely,

DavidiTunes Music Store Support

So consider yourself warned!

Reinstalling Windows

Something great happens when you finally succumb to the inevitable fact that
you need to wipe your machine. That happened for me at 4 PM yesterday. Over the
last few weeks, I tried everything to speed it up, but no amount of defrag’ing,
deleting, uninstalling was doing it. But when you finally relent to what you
know has to be done, there is certain amount of calmness because you know your
frustrations will dissipate 24 hours from then. So I started my “Reinstall
Windows TODO List”:

  1. List all programs installed by looking in All Programs menu and in
    C:\Program Files.
  2. List out any specialty drivers you may need
  3. List all CD Keys for each program in #1.  I keep a master list
    usually up to date, so this step is pretty fast, but it is still smart just to
    make sure.
  4. If not on CD, put all your installs in one place for each program in #1
    and #2.  I like to download everything into a C:\Installs folder. I like
    to download some of the files on another computer while reformating and
    installing my primary computer.
  5. Back up all important folders and files.  Those folders for me are:
    1. Outlook Files
    2. My Documents
    3. My Music, My Pictures
    4. C:\Projects
    5. Databases
    6. C:\Installs
  6. Export data, such as:
    1. FTP Settings
    2. RSS feeds
    3. Outlook contacts (Just in case)
    4. Outlook Rules
    5. IIS Websites
    6. Bookmarks
    7. UPDATE: Deauthorize your iTunes account!
    8. Specific program settings

Since I have to write them down anyway, I may as well list my programs to
reinstall:

  1. Adobe Photoshop CS
  2. Adobe Reader 7
  3. Advanced Intellect aspNetEmail, POP3, ListNanny
  4. ahead Nero
  5. BitTorrent
  6. Bluetooth drivers
  7. Browser plugins: Flash, Shockwave, Java
  8. C:\windows\system32\drivers\etc\hosts file
  9. Codesmith
  10. CuteFTP
  11. Firefox
  12. Franklin Covey Planplus for Outlook
  13. GhostDoc, NDoc, NUnit, NUnitASP
  14. Helicon ISAPI_Rewrite
  15. InterVideo WinDVD 4
  16. iTunes
  17. Java 2 Runtime
  18. Jetbrains Omea Reader
  19. Jetbrains Resharper
  20. JHymn
  21. Lookout for Outlook
  22. Microsoft Enterprise Library
  23. Microsoft Mappoint
  24. Microsoft Office 2003
  25. Microsoft SQL Server
  26. Microsoft Visio
  27. Microsoft Visual Sourcesafe
  28. Microsoft Visual Studio 2003
  29. Microsoft Visual Studio 2005 Beta 2
  30. MSDN Library 2005
  31. MSN Messenger 7
  32. MSN Messenger Plus
  33. Musicmatch Jukebox 10
  34. Mythicsoft FileLocater Pro
  35. OpenOffice 2.0
  36. Palm Stuff
  37. Peters Date Package, Professional Validation & More
  38. Postxing Reflector
  39. SnipeRight
  40. Sound and Video Drivers
  41. Sprint Business Connection
  42. The Regulator
  43. TiVo Desktop
  44. Trillian
  45. w.bloggar
  46. Winamp 5
  47. WinMerge
  48. WinRAR
  49. Winzip
  50. Xingtone
  51. XMLSpy

Then I just go through my TODO list one by one. Once I have my list above, I
put checkmarks next to each one as I find the installs and another for the
cdkey. Once I re-install, I check next to that program again.

I have to say that I did pretty good this time around.  My only
casualties were my Outlook Mail Rules.

After my install, I started remembering those issues that nag at me each time
I do this. I never waste *too* much time on them, but it is annoying when I have
to re-solve it each year:

  1. When installing Windows, make sure to select IIS and Front Page Server
    Extensions.
  2. In order for Direct3D to be enabled, enable hardware acceleration under
    Display Properties. This is important for games and DVD software to function.
  3. To get rid of having to comment on each windows shutdown, Start > Run
    > gpedit.msc > Computer Config > Admin Templates > Windows Comp
    > System > Display Shutdown Event Tracker.  Set to False.
  4. UPDATE: Shut down and disable Index server or prevent it from scanning your code directory. See MS Knowledge Base 329065.
  5. UPDATE 2:Install this fix to allow Windows to find files with unknown extensions (which is like all of them).

I must admit to being more impressed for it. I’ve even recommended it to all my friends.
Thanks!
I have been using it. Outlook Express more stable and secure than other programs.

Windows 2003 SP1 Errors

Since I installed SP1 here are the problems I am having:

  1. MSN Messenger gives me 4 script errors each time I sign in: Line 373, Char
    2, Unspecified error, URL:
    http://t.msn.com/en-us/default.aspx?ver=7.0.0777&did=1
  2. MSN Messenger will prevent me from using the ENTER key when sending a
    message. Once I restart it, it will work for awhile before it does it again.
  3. When creating a new IIS website, it will set Scripts to “None” preventing
    Visual Studio to inter-operate with it. This is easy enough to fix in the home
    directory, once you know about it.