Category Archives: How-To’s

Play Sim City 4 At Higher Resolutions

Are you a fan of the super popular city building game SimCity 4? Are you still playing this game today but hate the lower resolutions the game natively allows you to select in the options screen? Well you’re in luck, I guess the guys over at Maxis did think about the future and the game does indeed support custom resolutions. I play the game in 1920×1080 as is my monitor’s native resolution and the game looks much better, let alone the extra screen real estate you have with all the mayor tools in the game!

All you need to do is add this to the target of your SimCity4 shortcut:

-CustomResolution:enabled -r1920x1080x32

Just change 1920x1080x32 to the resolution you’re looking for. Be sure to add the text after the quotation marks of the target. So it should look like:

“C:\Program Files\Maxis\SimCity 4\Apps\SimCity 4.exe” -CustomResolution:enabled -r1680x1050x32

If you’re using the Deluxe version, keep in mind that the target will likely be in a different folder:

“C:\Program Files\Maxis\SimCity 4 Deluxe\Apps\SimCity 4.exe” -CustomResolution:enabled -r1680x1050x32

If you’re using Steam, add the extra parameter without quotation marks to Launch Options (right-click SimCity 4, select properties) of the game.

Checkpoint Firewall – Static Network Address Translation (NAT) How To

Over the last 6 months I have been taking on a greater role with our networks at work and as such have fairly good exposure to administering CheckPoint based security devices, more specifically CheckPoint Firewall-1 NGX R65 and CheckPoint SmartCenter on SecurePlatform.

We have recently installed new Polycom HDX video conferencing units and needed to allow the internal IP’s of those video conferences to NAT through our firewall out to public IPs for external calls. The way this is achieved is through Network Address Translation (NAT) through host objects in your checkpoint database which are then applied to a Firewall-1 appliance.

How do you do this? Easy. There are two translation methods supported from a host point of view, static or hide.

Once I had determined which public IP addresses I wanted to use for each video conference, I was able to sort out the NAT for each video conference unit by:

  1. Create a host object for the VC (eg. BoardroomVC) and add the correct internal IP
  2. (optional) – add each new host to a group called ‘video conference units’, useful to group all VC’s for use in firewall rulebase
  3. Right-Click a host and click properties
  4. Click ‘NAT’ on the left hand side
  5. Check the box ‘Add Automatic Address Translation rules’
  6. Select Translation Method = Static
  7. Enter the public IP address you wish to NAT the internal IP of the host to an external IP
  8. (optional) – select which gateway this NAT will work with, otherwise leave ‘All’ selected to install to all gateways managed by the SmartCenter.

That’s all there is to it. The NAT will take effect once you install the policies to your firewall gateway. Once you know how NAT works in CheckPoint it is pretty straight forward. This example was pretty basic by using static NAT’ing however NAT can get a bit more complicated but as they say in IT the simpler approach is usually the best!

How To Upgrade Samsung Galaxy S2 (i9100) to Android 4.0 Ice Cream Sandwich

I recently upgraded my Samsung Galaxy S2 to the latest version of Google’s new Android 4.0 operating system ‘Ice Cream Sandwich’ and I must say, things have improved A LOT! There are many things that were missing from previous releases that we android users just took for granted, some features of which have been a staple in the iOS ecosystem for a while now but now that Android has these nailed down it is truely the killer OS out there at the moment in my opinion.

Many things that Android has done better compared with its competitors are things phone/tablet users use every day, rather what it’s competitors do which are questionably used as frequently.

A few of the new features include:

  • Resizable Widgets
  • New lock screen actions
  • Quick responses for incoming calls
  • Improved Text Imput

For a closer look at the feature set of this new release please check out the android developers – Android 4.0 Platform Highlights page for more information.

Windows Deployment Services (WDS): Boot Image Changes Not Happening For You?

We use Windows Deployment Services (WDS) at work. There is a lot I really like about this deployment solution but there are a few things here and there that I wish were a little different. More specifically, how the system deals with boot image changes. It’s easy to forget that when you update your deployment share you still need to remember to copy your new boot image into your actual remoteInstall share PXE uses to pull the image. Otherwise your changes won’t be seen by PXE clients.

We started purchasing new Dell Latitude E6420 laptops to add to our fleet and as with any new computer model you wish to deploy Windows to via WDS, you need to obtain the driver cab file from the manufacturer to add the appropriate drivers into your WDS boot image. I added the drivers as usual to the Out of box drivers section of the deployment share, updated the share to rebuild the boot image and boot it up of PXE but Windows setup kept complaining that there was no driver present for the network adapter to continue. As it had been a while since I had to update anything in my WDS I had completely forgotten to move my new boot image into the right path for PXE to pick up. “Why haven’t my changes updated in the image during the update of the share”? Well, they had, I just wasn’t booting the right image.

When you update your deployment share, The deployment workbench typically creates/update the boot image stored in DeploymentShare\Boot but PXE pulls the boot image from WDS from here \\server\remoteInstall\boot\x64\images\<imagename.wim>.

So, to have workstations pull the correct image to apply you simply need to make sure you’ve copied the latest boot image with all your changes into your WDS set-up. You can manually copy/paste the new boot image over the old one using the paths above, or you can use the Windows Deployment Services snap-in to do the same job.

Open the deployment snap-in (%windir%\system32\WdsMgmt.msc) and:

  1. Expand your server and click ‘Boot Images’ to see a list of your boot images
  2. Right-click ‘Boot Images’ and select ‘Add Boot Image’
  3. Browse to the deployment share boot image directory (DeploymentShare\Boot). Click Next
  4. Give your boot image a name and description. Click Next
  5. Check the summary and click next to add the new boot image to your deployment server.
If you only have 1 image like I did you’ll now see 2 different boot images. If you don’t want to see a boot selection screen when you boot your machines off PXE, just right-click a boot image and select disable so its not used.
It’s easy to fall into the trap of thinking that when you update your deployment share with boot image changes (drivers, application selections, etc) they will take effect immediately but computers won’t start using the new boot image until you’ve added it to your WDS server for PXE to grab. You would need to remember to do this each time you add new drivers, make application install changes, make any changes to deployment rules (bootstrap.ini), etc.

Recursively Process A Directory Using DirectoryIterator In PHP5

Perhaps one of the most used features of PHP5 for me are the great new in-built iterators, more specifically the DirectoryIterator and RecursiveDirectoryIterator functions. Using these saves a lot of time hand-coding the logic behind listing files in a directory on the local machine as these new iterator functions handle all that legwork themselves.

For those of you who are unsure as to what an iterator is, its basically an object that is able to ‘cycle’ through occurrences of other objects. It doesn’t matter if we are cycling through a bunch of letters, numbers or files in a directory, iteration is a key programming concept that is a fundamental building block of most programs.

You may have seen the usage of a numeric iterator before (say $i):

$i = 0;

echo “Number is equal to: “ . $i


Processing A Single Level Directory:

A simple example of the use of the (much simpler) DirectoryIterator function can be seen below:

$it = new DirectoryIterator("/tmp/mystuff");
foreach( as ) 
{ if (!->isDot())
{ echo . "\n"; } } ?>

Processing A Multi-Level Directory (Nested):

$it = new RecursiveDirectoryIterator("/tmp");
foreach(new RecursiveIteratorIterator() as ) 
{ echo . "\n"; } ?>

In this case, the output should now include a list of all the files and directories under the starting directory (very handy for when you want to quickly print and dig down into multiple levels of a directory tree!

New Page – Online Papers

Over the last 5 years or so I’ve written a lot of technical documentation, reports, etc in the fields of Computer Science and Information Technology. I decided to share with you some of the work I’ve done in the past in the hopes of passing on or sharing some knowledge to help with a problem you’re having, or to better understand a concept you just can’t seem to grasp.

I’ve created a new page on my website which you can see to the right of the title navigation called “Online Papers” which is where you can access all this material.

I can understand how frustrating it is to find help on a particular subject you’re interested in and I hope if that subject you interested in is in fact an interest of mine then you’ll be able to find great help right here!

I wrote many documents on this page quite a while ago. Some may still be relevant, some may not but those that may not may still be interesting to those who like a little history lesson.


Java JDK 1.5+ Better Way To Read User Input

You Java programmers out there may think I’m crazy but I haven’t written anything in Java for at least 4 years, and in that time the talented guys over at Sun Microsystems have made reading user input much much easier than the old days of JDK 1.4 where we had to suffer with using bufferedinputstream objects.

For those of you who may be new to Java or are coming back to it (like me) after a long hiatus you will be very happy to know there is a nice handy class you can call upon to do this for you…the Scanner Class.

The scanner class is much easier to use to capture user input these days. All you do is create the object:

Scanner in = new Scanner(;

Then call the appropriate method to capture a string, integer, long, etc.

number = (double)in.nextInt();

Here’s a quick example of it in action:

import java.util.Scanner;
public class MyUserInput
  public static void main(String[] args)
    double number;
    Scanner in = new Scanner(;
    System.out.println("Enter your gross income: ");
    if (in.hasNextInt())
      number = (double)in.nextInt();
      System.out.println("You entered " + number);
    else if (in.hasNextFloat())
      number = (double)in.nextFloat();
      System.out.println("You entered " + number);
    else if (in.hasNextDouble())
      number = in.nextDouble();
      System.out.println("You entered " + number);
      System.out.println("Token not an integer or a real value.");  

A much easier alternative to what we used to have to go through. Many of you may have written your own classes when JDK 1.4 was used to simplify the process (which was what I did) but this new way is a real nice way to capture input.

Improve Game Performance In Windows Vista – Disable Vista Aero Interface

Have you noticed that if you play a game in Windows Vista it seems to underperform compared to running the same game in Windows XP? You’re not the only one.

Windows Vista has a much steeper dependency on the graphics subsystem than Windows XP does mainly due to the behemoth that is the Vista Aero interface. Basically if you’re unsure what this is, its basically an improved version of the basic windows interface enabling graphics effects such as the transparent window borders (glass) and flip 3D (Win+Tab) among other things.

When you want to play a game, you don’t need to use these things and you really want your graphics card to be focused primarily on the game at hand, instead of having to juggle the two.

To improve the performance of your games in windows vista, just turn off the Aero interface when you play a game.


1). Right click your game icon and click properties:


2). Click the ‘Compatibility’ Tab and check the “Disable desktop composition” setting.

Click Apply to save your changes.

The next time you run your game, the windows aero interface will be disabled while you play your game.

I originally didn’t think this would really make much difference when playing games (and it won’t for older games) but I’ve seen an increase of maybe 10-15% on frame rates in many newer games on my computer so its a small tip, but definitely a worthy one.

Keep Getting Blue Screen Errors? Use Windows Debug Tools For Crash Analysis

minidumpDo you use windows XP/Vista and keep getting blue screen error messages and don’t know why? With a little super sleuthing of your own you can find the cause of most windows crashes yourself.

It’s not that hard but if you have any software experience (engineering, programmer, etc) it will definitely help if you’ve never seen the output of a memory dump before.

If you have your windows error reporting settings set at their defaults in either Windows XP or Windows Vista, when the OS halts and you receive a blue screen of death it will produce a minidump file (ie. Mini012509-03.dmp) we can use for later analysis of what was in memory at the time of the crash and will give us a good idea on how to solve them for good.

To find out if the cause of your crash is driver related or a hardware fault of some kind for example you’ll need something that can analyse your crash dump files.

The best tool to use is Microsoft’s own debug tools for windows which can be downloaded for free.

How do you use this software to analyse crash reports? Here’s how:

1). Once you have downloaded Microsoft Debug Tools for Windows run the application WinDBG which can be found in the start menu under ‘Debugging tools for Windows’.

2). Next you’ll need to set the symbol file path by clicking File—>symbol file path.

To make it easier you can use the symbol files directly from the microsoft site:


Once you have the symbol file path set in the debugger its time to load the minidump file created during the crash. Windows stores crash dump files here:


3). Click File –>Open Crash Dump and browse to the above directory and choose your dump file. They will be labelled with the date they were created.

Once its done you will need to analyze the file to generate the full crash report which will tell you everything you need to know:

type: !analyze –v

The debugger will start loading the crash dump file and start interpreting it for you. Have a look through the report. The first few lines should give you a good idea what the problem was whether it was a driver, piece of hardware which faulted, software crash, etc.

If you’re still stuck and not really sure what you should be looking for or just want a little more information regarding how this tool is used take a look at the Microsoft KB article on this procedure here.