7-Zip Command Lines (Windows)
by Tom Gee on Aug.09, 2010, under Scripts
To extract all .zip files in the specified directory and make a new folder in the current directory for the extract that has the same name as the .zip file:
- D:\Unzipped>”c:\Program Files\7-Zip\7z.exe” x d:\Zips\*.zip -o*
- “C:\Program Files\7-Zip\7z” a -tzip D:\Zips\Data_20100801.zip D:\Output\Data_20100801
Backup PC via Batch Script
by Tom Gee on Apr.25, 2010, under Scripts
I made a few small alterations to the script found [http://www.speedguide.net/read_articles.php?id=1547] and use it on a regular basis to backup my Windows 7 PC.
The source code is as follows, where F:\Backup is the location on my external drive where I want my files to be copied to:
Microsoft Excel: Count the number of unique values in list
by Tom Gee on Apr.19, 2010, under Excel
To count the number of unique or distinct values in a list in Microsoft Excel, use the following formula. A2:A177 is the range of cells you want to count the unique values in:
=SUM(IF(FREQUENCY(A2:A177,A2:A177)>0,1))
Twice baked potatoes on the grill
by Tom Gee on Apr.16, 2010, under Entree, Uncategorized
Start with two 6-7″ Russet (Idaho) potatoes.
Wash potatoes with cold water
Place 2 potatoes on a paper towel on a plate.
Using a fork, stab the top of the potatoes deep enough to simply pierce the skin and allow moisture/steam to escape.
To speed up the cooking process, place plate of potatoes into microwave.
Cook in microwave on High for 15 minutes, flipping the taters over every 5 mins.
After they have been in the micro for 15 mins, remove from microwave and allow to cool 5-10 mins or until they are cool enough to touch. This is a good time to begin pre-heating your grill. Heat to medium (400 degrees give or take)
Next, cut the potato length-wise, removing the top 1/3 of the tater.
Now, grab a spoon and gently begin scooping the “meat” out of the potato and place it into a medium size bowl, thus turning the potato into a tater boat. Try to leave about 1/4″ of the potato against the skin for strength.

Tater boat
In the bowl that you scooped the innards into, add 1/2 cup sour cream, 2/3 cup cheddar cheese, 1 tbsp minced parsley (parsley flakes will work too), a little salt and pepper, and mix around. Don’t over-mix the filling, leave it chunky.

Scoop the mixture back into the tater boats. There should be a little too much mixture left over after filling the boats. Om nom nom…
I like to add bacon pieces on top of my potatoes. Any salad bacon toppers work fine for this.
Place the potatoes directly on the grill and cook for approximately 10-15 mins. Try to keep the lid down so that the heat permeates all sides of the taters.

Tater 1

Tater 2 - with bacon pieces
Remove the potatoes once they start to become golden and you can see the cheese mixture starting to bubble out.

Twice baked potatoes, fresh off the grill!

Twice baked potato with thin-cut NY Strip steak (Montreal steak seasoning), both grilled.
Om nom nom!
Stop the loud system beep on remote desktop sessions
by Tom Gee on Apr.16, 2010, under Remote Desktop
Sick of the ridiculously loud system beep coming from your Remote Desktop sessions, even if you have Remote Audio Playback turned off? If so, do the following on your local machine that you are connecting from:
- Open Device Manager
- View > Show Hidden Devices
- Expand the Non-Plug and Play Drivers node
- Right-click Beep and choose Disable
You’ll have to reboot or log-off and back in for the change to take effect.
That’s all there is to it!
Sequentially run all VB Script (.vbs) files in a directory
by Tom Gee on Apr.06, 2010, under C#, Uncategorized
Create a new C# Console Application in Visual Studio and compile the code. Copy the compiled .exe file to the directory containing the .vbs scripts you want to run in sequence.
How to generate a random number in C#
by Tom Gee on Mar.19, 2010, under C#, Programming
Here’s a quick and dirty way to use Microsoft’s “Random” class for generating a random (or as you will soon find out, not-so-random) number.
Because I believe in code reuse, I started by creating a new function that would return the random number as an integer datatype.
static int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}
The only things you have to pass to the function are the upper and lower boundaries that you want the random number to fall between.
int zip = RandomNumber(10000, 99999);
In the above example, a random number between 10000 and 99999 will be assigned to the “zip” variable.
As I stated above, the random number isn’t actually very random and, therefore, might not be a perfect fit for what your trying to use it for. However, the Random class serves its purpose for quick data generation for application testing.
Happy coding!
Home Fries
by Tom Gee on Feb.28, 2010, under Breakfast
Today was my first attempt at making homemade home fries. They were very easy to make and very tasty!
- Cube 3-4 medium size potatoes
- Add to saucepan with 3 tablespoons of butter or margarine.
- Bring to medium heat, make sure all of the potato cubes have been coated with the butter, and cover for 10 minutes
- Remove cover, add seasoned salt & pepper, and continue cooking on medium for another 5-10 minutes or until golden (stir frequently)
That’s it! I’ll have to make them again in the near future and snap a pic to add to this post. Om nom nom!
Print Spooler Error in Windows 7 under Boot Camp
by Tom Gee on Jan.31, 2010, under Boot Camp
BACKGROUND:
A few months ago I installed Windows 7 on my Macbook Pro (13″ Unibody running Snow Leopard). Yesterday I decided to try and boot into my Win7 Boot Camp partition via VMWare Fusion v2.03. Doing this installed VMWare tools to Windows 7.
PROBLEM:
Today, when I booted directly into my Windows 7 partition (not via VMWare), I noticed that I couldn’t print anything anymore.
I checked the Event Viewer and found the following error in the System log:
The Print Spooler service terminated unexpectedly.
In the Application section of the Event Viewer, I found the following:
Faulting application name: spoolsv.exe, version: 6.1.7600.16385, time stamp: 0x4a5bd3d1Faulting module name: TPVMMon.dll, version: 2.0.51.5, time stamp: 0x48359080Exception code: 0xc0000005Fault offset: 0x000000000000846eFaulting process id: 0x1300Faulting application start time: 0x01caa2aa2c4394d8Faulting application path: C:\Windows\System32\spoolsv.exeFaulting module path: C:\Windows\System32\TPVMMon.dllReport Id: 7188e318-0e9d-11df-9123-895fd79b6e49
The only thing I could attribute the Print Spooler issue to was VMWare Fusion.
I tried uninstalling the VMWare Tools program listed in the Control Panel > Uninstall Program section, but it would not remove. No errors were displayed, but the program wouldn’t remove from the Programs list.
SOLUTION:
I deleted the following folder (and all related subkeys) from the Registry (via Start > Run > regedit):
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Print\Monitors\ThinPrint Print Port Monitor for VMWare]