How to install XP with Windows 7/Vista pre-installed

I have just installed Windows XP on top of Windows 7. So I’m gonna tell you how to do it while its still fresh on my mind.

It took me about 3 hours to do this because its actually the first time I have done this. So I hope this guide will help you cut down the time that I have spent on it.



Easy BCD 

Windows XP SP2/SP3 installation CD

Windows 7 installation CD

Common Sense


Backing up the MBR

First thing that you need to do is to download and install Easy BCD. Then backup your Master Boot Record.


Back it up into an external location. Maybe a flash drive or an external hard drive. Just in case something will go wrong.

Just click on backup settings after you have selected the external location. Then check in the actual directory if there is a .bcd file in there. If there is none, then you have to click the backup settings button again until you will find the backup file in the location that you specified.


Partition hard drive

Next thing that you’ll need to do is to partition you hard drive. So that Windows XP will have a place to be installed.

To do that just right-click on Computer and select manage. Then select the disk management section:


If you no partitions on your drive. Then you will need to shrink the partition where your current operating system is installed. Right-click on that partition and select shrink volume:


You’ll see something like this, but just wait since it may take a while depending on the size of your hard disk and how much files are stored in it.


Change the partition size  to your desired size. In this example it will be 10 Gb or 10240 Mb:


You can put whatever you want as long as its not above the largest size that is possible to shrink. Click on Shrink after you have inputted the desired shrink size.

Just leave the newly created unallocated space. But remember the size that you have inputted since we will make it as a basis when we install Windows XP.

Right click on the drive and select properties if you have forgotten its size. You’ll just have to convert the number indicated in there using an online converter. Because its expressed in bytes. What we need is the value in Kilobytes and Megabytes.



Installing XP

Restart your system. And go to your BIOS by pressing on f2 or del on your keyboard. Here’s a list of bios suppliers and the keyboard commands that you can use to access it:

While you’re in the BIOS just change the SATA Mode to IDE. Because AHCI is somehow not compatible with Windows XP. Here are some supplements:

This step is the most important since you will be getting a Blue Screen of Death or BSOD if you don’t change the SATA Mode into IDE.

Set your BIOS so that it will boot from the CD-ROM or DVD-ROM first. If you don’t know how to do that then visit this link:

Save changes and exit.

The Windows XP installation CD will boot and then it will prompt you to press any key to boot from CD. Just press any key in your keyboard if you see this prompt.

Just go through the usual installation process. Visit this link if you don’t know how to do the usual process of installing XP.

My only reminder is that you have to select the drive partition that you created a while ago. So that you won’t messed things up.


Repairing Windows 7 MBR

What you’ll need to do now is to restore the Master Boot Record of Windows 7. You will have to use the installation of Windows 7 to do this.

Here’s a guide from Microsoft on how to repair the MBR:

But what I did was to use the commands below in the built-in command line tool in Windows 7 installation CD:


Those commands will restore the Master Boot Record.

And will enable you to see the boot loader for Windows 7 again.


Restoring Windows XP

All you have to do now is to add an entry for Windows XP on the boot loader. This is where Easy BCD comes in again. Just click on Add New Entry.


I’m using the current version of easy BCD. Version 2.02. The interface might be a little bit different if you’re using a different version.Just select Windows XP on the OS type drop-down list. And click on Add Entry


To check if it has indeed added Windows XP on the list. Just right-click Computer. Select properties. Advanced System Settings. Then click on Advanced tab. On the Startup and Recovery Section click on Settings


It has Microsoft Windows XP on the list.  Then just reboot your system. But if not then you’ll just have to repeat the process that you did on Easy BCD.


Always remember that you cannot boot Windows XP if your SATA Mode is AHCI. And you cannot boot Windows 7 if your SATA Mode is set to IDE. So you need to switch SATA Mode into AHCI if you need to boot to Windows 7. And IDE if you want to use Windows XP.



That’s it. There’s a challenge for you though. If you discovered how to boot XP or 7 without switching SATA Modes then please tell to me in the comments. Thanks!


How to install incompatible applications in windows 7

There are times when you have an application which you want to install. And then you get an error similar to this:


Saying that the application that you’re trying to install is not compatible with your current operating system. In this case, Windows 7.

A simple workaround on that is to run the installer in compatibility mode with the current OS.

To do that, just right-click on the installer and select properties.

Click on the Compatibility tab. And check the ‘run this program in compatibility mode for’. Then select the operating system indicated in the error.


Click apply then click ok.

Launch the installer again. And you will now be able to install it on your system without having problems.

Empty mysql tables

This is a quick guide on how you can empty all of the records that is stored on a mysql table. This is useful for testing purposes, when you want to declutter the database. You can also think of different things where to use the truncate function if you’re creative.

query_database("truncate table purchase_transactions", "onstor", $link);
query_database("truncate table sales_transaction", "onstor", $link);
query_database("truncate table vendor_credit", "onstor", $link);
query_database("truncate table supplier_table ", "onstor", $link);
query_database("truncate table reports", "onstor", $link);
query_database("truncate table customer_table", "onstor", $link);
query_database("truncate table customer_credit", "onstor", $link);
query_database("truncate table categories", "onstor", $link);

That’s how you do it the long method. Here are some supplements if you want to learn how to do it in a shorter way:

Using auto-increment in mysql

This is a short guide that will teach you how you can auto-increment a field in a mysql table. What auto-increment does is to fill up a value for a field without user intervention. It automatically generates auto-incrementing values as you use an insert query. Auto-increment values are usually used as a primary key or unique key for a certain table in a database.

Here’s a screenshot that will give you an idea on how to auto-increment a field.


The value that would be inserted in this field would be 1 to n. Where n is the numeric value of the last record that you have inserted in the table.

When you perform an insert query, you don’t need to supply values on these fields. That’s very useful because the amount of time needed to complete a form is diminished because a unique number for the primary key is automatically generated.

Storing date and time in mysql table

In this quick guide, I’ll be showing you how you can store date and time values on mysql table using php.

First thing that you need to do is to declare your database information.

$con=mysql_connect("localhost","root","1234"); //host, user, password
mysql_select_db("onstor",$con); //database and the connection information

Then set your time zone. You can find a list of time zones that is recognized by php in this link:

I am living in the Philippines so my time zone would be declared this way:


The most important part is the value of date that you’re going to store in the database.

$date=date('Y-m-d h:i:s');

That’s the date format that is recognized by mysql. You can modify it but it might store something like this, if you don’t get it right:

0000-00-00 00:00:00

And finally, the query that will store the value into the database:

mysql_query("INSERT INTO reports(DATE) VALUES('$date')");

That’s a quick guide on storing date and time values on mysql database. Hope you learned somethingSmile

How to add application exceptions to windows firewall

In this tutorial. I’ll be showing you how you can add an exception to a certain application in windows firewall. Placing an exception to an application means that the firewall will not block the application from allowing inbound or outbound connections to your computer.

Be careful when placing exceptions though. Make sure that the application that you’re allowing is not shady. Only place exceptions to applications which you trust and you are 100 percent sure that its safe.

To add exceptions to applications on the windows firewall. Just go to control panel. Select view by small icons. Then click on windows firewall


The windows firewall control panel module will show up. Then what you have to do next is to select ‘Allow program or feature through windows firewall’.

You will see here that there are already some applications which are allowed through the firewall. Scroll down through the listed applications and see if the application that you want to allow is in there. If its there then just tick the checkbox beside it. There are two choices though.

First is  the home/network. This means that the firewall would only allow the application to have access to inbound and outbound connections inside the network. If the application that you are trying to allow is used for file sharing then the files that you share would only be accessed by those who are inside the network where you belong. People outside it would not be able to have access to it.

Second is the public. This means that everyone could have access. Even people outside the network. An example of this would be a website test. If you want people to test the website that you have made in your localhost. Then this is the option that you need to check.

But if the application that you want isn’t listed then you can always add them to the list and check them afterwards. To do that just scroll down a little and you will see the ‘allow another program’ button. Just click it.


Another window will popup and it will let you choose from the list of programs. If the program isn’t still in the list. Then just click on browse. And browse for the executable file that you use to launch the program. If you don’t know where’s the executable file of that program. Then you might want to check the startmenu and find your program there. Right click the program and select properties.

For example if you want to allow notepad through the firewall.


Just copy the directory path, next to the start in label. And then navigate into that path when you’re browsing for the program that you want to allow through the firewall.



That’s it, your application will now have access to the internet once you enable it through the firewall.

How to access localhost of computers outside the network

In this guide, I’m going to show you how you can access the localhost of other computers outside or inside your home network.

This guide is specifically intended for people who are working on a website which needs testing from users. Because most of the time the programmer will not see all of the programs defect, errors, or bugs. And only the users can point this out.


Wired Connection

For those of you who have wired connection. The method of letting others access your projects for testing purposes would be much more easier. To do this, just go to Then copy your ip address. Paste it into the address bar of your browser. If you can see something like the screenshot below then it works for you, but were still not sure if it would work for others. So to try it out, just give your ip address to your friends and let them do the same:


If it doesn’t work for them. Then maybe who have somehow messed up with your firewall configurations. I won’t recommend you to try and disable it. Because that’s stupid.

To do that, just go to your control panel, and then click on windows firewall. Then click on restore defaults.


It will warn you that restoring defaults might cause other programs to not function properly. That’s why I recommend that you create a restore point first. After creating a restore point, just click on restore defaults.


Next thing that you need to do is to ensure that ip addresses from outside the network would have access is to configure your http.conf file. Just left click on the wampserver tray icon then select apache, then click on httpd.conf.


If its your first time opening the file, then it would prompt you to select a program that you will use to open the file. Just select notepad from the list.

Now, press ctrl+H on your keyboard to launch the find and replace tool in notepad. And type:



You have to modify the part enclosed in <directory> tags. Replace the Deny from all with Allow from all. The text enclosed in <directory> tags will now look like this:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all

Just save that one and then restart your wampserver. Others should now have access to your localhost, and they can now test your projects.

Last thing that you’ll need to do is to make sure that you’re server is actually online.


If you can see that the text in there is Put Offline. Then yours is already online. And ready for access from the outside world.

If you want to protect your codes from being downloaded. Then you have to put index.php file on every folder of your project. Be it javascript or css. But the most important are the php files.

If you didn’t then your testers might see something like this:


And its not cool. I’m telling you. Because if they see that one. They can download it.


Wireless Connection

This part of this guide is intended for those who have laptops or desktop which connects to the internet via router or wireless hotspots or wi-fi. The ip address that the people from outside the network will use to access your localhost is the ip address that you can see in

There are few things that you need to do which I already mentioned at the top. So do these things first before you continue:

  • Edit your httpd.conf
  • Make sure your server is already online

If you’ve done that then fire up your command line by typing cmd on the search bar.

Type in ipconfig/all

You’ll see something like this(Sorry but if I’m taking precautions here. I’m not actually gonna show you whats my ip address and everything:


You’ll only be concerned with the value of the ipv4 address in here. Just paste that ip address into your browsers address bar. If it doesn’t work then you might need to configure your router as well.

Here’s how to configure your router. Just go type or  on your browsers address bar to access your router settings.  The usual username and password would be admin.

Go to forwarding, then add the ip address which you have copied from the command line a while ago. And paste it into the textbox which requires the ip address. Then type 80 on the port. Port 80 is the port that is commonly used. But if you’re accessing your web directory through a different port, then use that port. Make sure you enable this configuration so that the port forwarding will work.



That is how you access localhost from other computers. Its just easy and I think it’s a nice tool for letting others see and test your work without having to host it on an actual server.