Saturday, June 30, 2012

How to make Bootable USB Windows 7 installer

OK, currently, my old laptop is broken.  It has a broken hard disk, broken DVD-drive, and the battery does not charge as it used to do.  So, good thing, I was able to buy a new laptop after an agonizing week without a computer at home.  But now, after a few months, I need my old laptop to work again. In order for me to test some stuff, without getting my new laptop destroyed or disrupting my current set-up.

I just bought a hard disk replacement, I was thinking the dvd-drive may still be in working condition. It was kinda working before, and kinda read DVD-discs.  I was ready to re-install my windows 7, but as expected the drive was really not usable.  It won't boot my installation disc for windows 7.

So, I search for a way to boot, other from a DVD-drive.  I was familiar of USB booting, but my previous attempts were just a sorry excuse for an IT person such as myself.  I may have not found a good site for my problem.  But now, with the use of my new laptop.  I was able to search this very nice solution, using your own windows 7 and windows 7 installation disk.  The solution can be found on this website: http://www.intowindows.com/bootable-usb/

I saw someone suggest in a forum to just copy the windows 7 installation disk on a USB.  But it was not that simple, in fact, I tried twice before I followed the instructions from the website given above.  I tried, the short-cut or reversed the procedure.  It didn't work, because the computer does not recognize the USB as bootable.  You have to follow, it step by step and just change the drive letter and number related to your own drive.

Ok, in case, the site link I gave is off-line.   Here are the steps given:


1. Insert your USB flash drive, make sure it has enough space to fit all files from the windows 7 installation disc.  I used a 8 GB drive, just to be sure.
2. Navigate to Start > All programs >Accessories > right click on Command Prompt and select run as administrator.  I tried running it directly from search box as cmd, but it could not have been set as administrator.
3. When the Command Prompt opens, enter the following command:
DISKPART and hit enter.
LIST DISK and hit enter.
Once you enter the LIST DISK command, it will show the disk number of your USB drive.  If you have a single drive with single partition, your USB drive disk no is Disk 1.  But you have to check the size on the list, just to be sure you are not formatting another drive other than the USB you have.
4. In this step you need to enter all the below commands one by one and hit enter. As these commands are self explanatory, you can easily guess what these commands do.
SELECT DISK 1 (Replace DISK 1 with your disk number, if it isn't DISK 1)
CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT FS=NTFS
(Format process may take few minutes)
ASSIGN
EXIT

If previously your USB is assigned as drive "F", after assign, it's probably drive "G" now.  Also, there was a time an error saying it cannot make changes, but it did, I think it was between CLEAN and CREATE PARTITION PRIMARY.  I just continued with the steps even with the error, and I was able to make a bootable disc.

Don’t close the command prompt as we need to execute one more command at the next step. Just minimize it.
5. Insert your Windows DVD in the optical drive and note down the drive letter of the optical drive and USB media. I use “D” as my optical (DVD) drive letter and “G” as my USB drive letter.
6. Go back to command prompt and execute the following commands:
D:CD BOOT and hit enter. Where “D” is your DVD drive letter.
CD BOOT and hit enter to see the below message.
BOOTSECT.EXE /NT60 G:
(Where “G” is your USB drive letter)
click to enlarge














7. Copy Windows DVD contents to USB.
You are done with your bootable USB. You can now use this bootable USB as bootable DVD on any computer that comes with USB boot feature (most of the current motherboards support this feature).

Note that this bootable USB guide will not work if you are trying to make a bootable USB on XP computer.

Side Note: I just copied the instruction contents, and added some of my thoughts and my experience when I made my own USB bootable disc.  This is, just in case the original source of the solution is down, or taken off-line.


Thursday, June 7, 2012

HTML list item adjusting margin space

During one of our developments to use list element to display items, we encountered a list that has a problem on spacing between items.

I looked for an answer thru google and here is the best that I can come up with based on the problem:

li {
margin-top: -1em;
}

They were actually asking for a solution to increase their space between list items. Which was the opposite of what I wanted, which was to decrease the space between items.

This answer was obvious after searching for about 5 mins.


Here are the sites I drawn my solutions from:

http://bytes.com/topic/html-css/answers/98755-how-increase-vertical-spacing-between-ul-ol-items

http://stackoverflow.com/questions/347404/ie-adds-extra-top-margin-to-every-li-element

Tuesday, June 5, 2012

Quirks mode in IE browser

It has been a problem for developers to have all browsers display their content as they intended it to be.  But, often, challenges are the different browser rendering, and different versions of the browsers doing something else.

The Quirks mode was made for the browser to render a specific page that it thinks isn't created for current html standard.  Often, this is to accommodate the old webpages that have not been updated to current new standard of the W3C specifications.

If you have been trying to create a webpage and the browser often resort to rendering it in Quirks Mode, it is better if you specify the doc type.  It isn't the best solution, but it will tell the browser to present the document or webpage the way you want it to be.

Use the following code on the very top of your page to have it render correctly as you intended it to be:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


The sources, I used to have the solution are on the following websites:
http://hsivonen.iki.fi/doctype/
http://www.quirksmode.org/css/quirksmode.html

Friday, June 1, 2012

How to Delete a Windows Service

Has it happened to you? You were trying to install a software, and there was an option for it to retry once it fails, but it instead failed again once you click retry.  And worst, it created a duplicate service with a suffix _1, making it difficult even if you uninstall it.

Even if you probably uninstall it, the other service will remain.  A way to remove a service is by using windows registry.  It's relatively easy, if you know what is a service, you probably know what a windows registry is.

To remove the service on a server do the following:
1. Run Regedit
2. Find the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"
3. Find the service you want to delete, it has the same name as shown in the services list.  Just right click and select delete on the service you want to remove.


Until next time.


Solution was found in this site: http://www.performiq.com.au/kb/index.php/Delete_a_Windows_Service