Hi All,

You've found the blog of Leighly G Penrod (better known as Lee Penrod). Over the years I've helped thousands of people with technology questions. I started this blog to share some of the problems I've personally solved, and to act as a place to put bits of new articles before they are ready for release.

In the past I wrote serveral things published by I worked for them for several years including doing various bits of technical writing. Although I no longer work for them, I do still put up some content on my blog now and then.

If you are not familiar with my prior work, feel free to see these popular guides I have written-

How to Install Front USB 3.0 Connections

How to Install Front USB
(connecting front ports to the motherboard)

Understanding System Memory and CPU speeds:
A layman's guide to the Front Side Bus (FSB)

Hooking up a Neon Light
[Old Article on making a card neon from Walmart work in a PC]

Wednesday, October 31, 2012

Plants vs Zombies Giveaway

The ADA (American Dental Association) + PopCap is giving away free copies of Plants vs Zombies for Halloween (2012).  Check it out at Stop Zombie Mouth:  
Their promo is valid until Nov 11th, 2012.

The are advocating giving coupons for the game away instead of candy.

Tuesday, October 30, 2012

A few quick links related to IP checking

Every now and then a Subnet calculator is handy, especially if you are managing IP Block lists.  Here are a few useful links and projects I have found to be helpful.

1) PHP Subnet Calculator @ Sourceforge. A simple open source subnet calculator written in PHP. The author has a example site that is great if you need to do a simple calc from slash notation.

2) Lexdos. A simple site that shows an arbitrary IP address vs a Google Map.

3) Pear Package: Net_GeoIP.  This handy little package will give you the ability to turn an IP address into a city / country / region and give you a rough guess on LAT/LONG.  It does depend on a source data file put out by MaxMind but the basic version ( GeoCity Lite ) is free. The pear package + GeoCity Lite is enough to at least tell if an incoming request is from a different country -- potentially very useful for fraud detection.

Monday, October 22, 2012

Doing simple backup on Windows 7 and Server 2008

You know, sometimes bad things happen to your data. Although it is a best practice to regularly back up a file server or PC, I've always been a fan of point backups and other techniques that enable you to back up certain things on a repeated basis.  I'm going to take a couple minutes to talk about two practices you should consider doing on your Server for any shared folder where one worker might destroy another's work either intentionally or unintentionally.

First of all -- Enable Shadow copies on your file server.  Technet has a pretty simple article on this at:

Shadow copy enables the "Restore Previous Version" feature you see commonly in Windows 7.  The previous version feature basically reserves a small part of your drive to keep versions of your files as they change.  It can't always save you but in the event of a failed backup or a minor problem like a long unchanged file that is suddenly gone, it can be the fastest method of restoring it.

Second, make and schedule point backups of critical files either with scripts or with a backup software.  Windows backup isn't really good for this, it's good for a full backup but it has too many restrictions right now for this kind of issue such as the Windows Backup 4K bug that makes it difficult or impossible to use many types of external and internal drives for backup purposes (especially very large ones).  You can and should use a dedicated non-advanced format drive like a WD Black 2TB or WD Black 1TB for a full backup on a scheduled basis however it shouldn't be your only backup for critical, often changed folders.

If you are not afraid of the commandline and task scheduler, my suggested method of backup would probably be to setup some simple batch scripts to do the task. There are a couple good free tools to make this happen. One good option is a simple install of 7-Zip.

7-Zip is a simple, yet powerful Compression / Decompression tool that runs on most operating systems. It is similar to WinRAR or WinZip but handles many formats and is free.  When you install 7-Zip you will get a commandline version of the tool called 7z.exe (or 7za.exe ).  It is commonly located in C:\Program Files (x86)\7-Zip after an install.

With the commandline version of the tool you can do virtually anything we can do with the file manager. Now there are several websites that talk about using 7-Zip on the commandline, but I'm going to share some specific examples.

Now to actually do these kinds of things on a scheduled basis you need to write a batch file, and it needs to drop a file with a unique file name.  It also needs to delete the old files on a consistent basis so that you do not run out of space on the backup drive.

Steps to writing the batch file:

1) Get a date. Literally I mean set a date variable. I find this line to work well:

set _mydate=%date:~10,4%%date:~4,2%%date:~7,2%-%time::=-%

What this says is -- give me a variable I can use at the commandline with full date and time, in a format that won't break file naming. It will produce something like this:


in variable _mydate.

2) Put 7z / 7za somewhere useful.  What you want is for typing 7z ( and hitting enter ) or 7za ( and hitting enter ) to run the program.  You can do this either by editing your path to include the folder for 7-Zip (such as: C:\Program Files (x86)\7-Zip ) or by copying 7z.exe / 7za.exe to a folder that's already in the path such as C:\windows\system32

3) Pick what you want to backup, and get a place to back up to. Generally any drive or share is going to work if you have sufficient space. If you want to use a remote file share or something like a Seagate GoFlex Home Server ( NAS ) you'll want to add a map line to the batch file before your attempt to backup the files to ensure that the drive letter you are trying to hit actually exists.

4) Write the script.

Here's my example. Backing up All  Excel and Word Files on a series of shared folders

set _mydate=%date:~10,4%%date:~4,2%%date:~7,2%-%time::=-%
 7z a -tzip G:\backups\" "D:\fileshares\*.xls*" "D:\fileshares\*.doc*"
 This little script will give you a unique file named something like in G:\backups\ that is a backup of all files in all folders below D:\fileshares\ that end in xls* or doc*  ( i.e. it backs up both .doc and .docx )  Obviously you would need to change this to meet your needs.

5) Add cleanup. A few years ago a new command called forfiles was added to commandline that allows us to do that.

Lets assume we have a massive drive and the backup is fairly small. We can hold 1 year of backups on it.

We might have this command at the end of the backup batch file:
FORFILES /P G:\backups\ /M *.zip /d -365 /C "cmd /c del @FILE"
 This command will delete any files older than 365 days old.

6) Save your batch file (usually done in notepad by saving as .bat ) and then go schedule it in task scheduler / scheduled tasks


If you are going to use a batch file to back up everything via scheduled tasks / task scheduler you are going to have to set it up so that the batch is ran with a user with a high enough privilege to work on the files and run everything even if you aren't there.  In Task Scheduler this likely means you will probably need to set your security options to "Run whether user is logged in or not" and probably also "Run with highest privileges". [ Unless you make a specially crafted user for this task with just the right permissions for everything]. If you do not do this, then your backup will not run properly.