Friday, August 14, 2009

Make a USB drive a key to boot into XP

For our task, a USB drive of a capacity ofat least 256 MB is required. If we need to include extra utilities, hotfixes, and sevicepacks, then we need at least a 512 MB drive.

Format the drive using "FAT" filesystem.

After having selected “Show hidden files and folders” and deactivating “Hide protected operating system files”, navigate to the root directory on which Windows is located, usually C:\. Copy the boot.ini, ntdlr,and NTDETECT.COM files from that directory to the USB Flash drive. Rename the “boot.ini” in C:\ to “boot.bak”.Windows will not now be able to boot from the hard drive,and the USB drive will be the key to unlocking the computer.Now to check whether your USB drive works or not! Restart your PC and select the USB drive as the First Boot Device in the BIOS.For this test, deactivate the “Quick Boot” and “Show Full Screen Logo” options in order to be able to monitor any BIOS-reported activities. Also, the “USB Legacy Support” and“USB 2.0 Controller” options need to be activated if available. Save your changes and exit the BIOS, and restart.If you encounter a problem booting, look for an option in the BIOS that extends the
response time of the USB drive, for example, the “USB Mass Storage Reset Delay” option found in the AMI-BIOS. Choose the highestvalue and gradually decrease the value until the problem pops up again. This should work, but if the problem persists, check your motherboard manual or visit the Web site of your motherboard’s manufacturer for a BIOS update.

Registry hacks to Improve performance of Windows XP

1. Load Applications Faster

The Windows prefetcher aims to load applications faster by “pre-fetching” the application and storing it in the pre-fetch cache. You can speed up application loading by changing the default value of one the settings under the relevant key.
Navigate to:
HLM\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management\PrefetchParameters

The default value for the EnablePrefetchersetting is 3.Change this value to 5to make applications load faster. You can experiment with higher values—up to 9—and see if you get a further
improvement.Since this relates to the system, a reboot is required for the change to take effect.
2. Optimisation Of The Boot Files

Normal file fragmentation scatters the pieces of a file all over your hard disk. This invariably also affects the files that load at boot time. You can defragment the files that load at system startup to enable faster loading.
Navigate to:
HLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

A setting called Enable under this key needs to be set to Y (forYes). This setting defragments the boot files, and it might relocate startup files into contiguous clusters on the volume, reducing the
movement of the disk head when reading the volume.
With the setting at Y, boot file optimisation occurs automatically if the system is idle for 10 minutes. A reboot is required for the change to take effect.

3. Unload Unused DLLs
After an application is closed, XP has the annoying habit of leaving the associated DLL files in memory. This can hog precious resources and memory, and also cause stability problems. Make
the DLLs unload themselves from memory after the program is done running.

Navigate to:
HLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL

If the DWORD Always UnloadDLL is not present, you will need to create it. Set the Value of the “(Default)” setting to 1. Application-associated DLLs will get unloaded when the application is closed.

4. Disable User Tracking
Useless to most users—except perhaps for system administrators—XP’s inbuilt user tracking system uses up precious resources.The system keeps track of the programs run by a user, the
paths followed, and the documents used. (Did you know your XP was spying on you all this while?) Disable this to free up system resources.

Navigate to:
HCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Set the DWORD NoInstrumentationto 1. This will disable most of the user tracking features of XP.

5. Run 16-bit Apps In Their Own Processes
Use this hack if you have more than one 16-bit application left over from the days of your nostalgia. XP runs all 16-bit applications in a single process. Having a separate process for each application can increase their stability and process.

Navigate to:
HLM\SYSTEM\CurrentControlSet\Control\WOW

Browse to the String DefaultSeparateVDM. If it’s not there, you’ll need to create it. Set its value to Yes.

6. Load Kernel Into RAM
In Windows 98, programs could be loaded and kept in RAM for as long as you wanted. You could even load a video clip into RAMdirectly and have it play from there! XP is much more restrictive,
mostly due to security reasons. But when it comes to the Windows XP kernel, there’s something you can do. By default, XP only loads the required parts of the kernel into RAM at boot time, and calls the other parts as and when needed. Having the entire kernel available in memory speeds up processing.

Navigate to:
HLM\System\CurrentControlSet\Control\SessionManager\Memory Management

Set the value of the DisablePagingExecutive key to 1. This will make the entire kernel be loaded in memory. A reboot is required for the changes to take effect.
Only use this hack if you have sufficient memory. Recommended: 512 MB or more. Also, this hack may affect some programs that use the Windows swap file directly, such as Adobe Photoshop.

7. Edit The Startup Programs List
Many of the programs that start up at boot time do not figure in the Startup folder. If you want to stop more than one application from loading at bootup, you will normally need to go and turn off the preference in each application one by one. Tedious and time consuming. This hack can help you do this in one go.

Navigate to:
HLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
And to:
HCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

All the programs that load at boot time will be specified under these two keys. Review the applications listed in this list and delete all the entries you don’t want started up at boot time. Next bootup, they’ll be gone.

Be careful not to delete needed programs such as anti-virus and anti-spyware programs. You should be able to identify them by their path if not by the file name.

8. Optimise The System Cache
Desktop systems are normally optimised for applications, and servers for file caching. Depending on how you use your system, you may want to optimise your system for either.


Navigate to:
HLM\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management

Find the setting LargeSystemCache. Set this DWORD value to 1 for server behaviour or to 0 for desktop behaviour.


Some programs such as SQL Server and Exchange Server set this value during installation and override the change.


9. Turn Off Windows Animation

Windows animations—like those that happen when you minimise or maximise windows—look good, but only if you have the processing power and/or RAM. To get the most performance
out of your system turn off this setting. You could do it via a host of settings in the GUI, but this Registry hack does it all in one fell swoop.


Navigate to:
HCU\Control Panel\Desktop\WindowMetrics


Change the value called MinAnimate to 0 to disable Windows
Animation. A restart is required.

Automate the installation of Windows XP

You can create a CD that can install Windows automatically, putting in all the details and answering all the dialog boxes. The secret behind the unattended nature of the whole thing is the answer file, which tells Windows what to do while it’s installing. The answer file can be created using Windows Setup Manager. Using this tool, you can make the answer file so powerful that you can even tell
Windows to include or exclude individual components, set the display resolution, and
more. Here’s how you do it.

1: To begin with, insert your Windows XP installation CD into the drive and copy the entire contents of the CD to a folder on your hard drive.

2: Navigate to the Support > Tools folder on the CD and double-click the Deploy.cab file. Copy all the files to a folder on your hard disk.

3: The crucial part begins now—creating the answer file. To execute the Windows Setup Manager, double-click the Setupmgr.exe file from the contents of Deploy.cab, which you just copied onto the hard drive. The next step explains the option you need to select from the first few dialog boxes that appear.

4: The first few steps of the wizard are self-explanatory. Select the following options from the successive dialog boxes: Create a new answer file; Windows unattended installation (Select the appropriate Windows version); “Fully automated”; “No, this answer file will be used to install from CD”; and finally, accept the license agreement.

5: Under General Settings, you can customise the installation of Windows by providing the default name and organisation, display settings, time zone and the product key. Fill in the fields using the drop-down lists or by keying in the details. If you don’t select an option from the drop-
down lists, the default values will be used.

6: Under Network Settings, configure the computer name, administrator password, networking components and workgroup. If you are specifying the Administrator password, make sure you check the option to encrypt the password in the answer file. If you have a static IP address, you can specify the settings under the Networking Components section.


7 : Use the Advanced Settings section only to configure telephony, browser and shell settings and installation folders. Under Browser and Shell Settings, click the browser settings button to set the home page and add Favorites. If you are on a network, you can also specify the proxy settings.

8 : After you’re done,click Finish and save the answer file as “winnt.sif” when you are prompted. Advanced users can further tweak the answer file by referring to the Help file called Ref.chm in the same folder as the Setup Manager. Finally, copy the answer file to the i386 folder in the Windows XP installation folder you created in the beginning.


9: To burn a bootable installation disc, you need the boot sector of the Windows XP CD. Download it from www.tacktech.com/pub/microsoft/bootfiles/bootfiles.zip, and extract the boot sector file to a folder. This file will be used with Nero Burning ROM to create the bootable disc.

10 : Launch Nero and select CD-ROM(Boot) from the New Compilation dialog bo Under the Boot tab, specify the boot sector file you extracted. Set the emulation as “No emulation”, and keep the boot message blank. Most importantly, remember to set the “Number of loaded sectors” as 4.

11: Under the Burn tab, set the write method to disc at-once. Click the New button to begin adding files and folders to the compilation. Drag all the contents of the Windows XP installation disc that you copied to your hard drive (with the answer file in the i386 folder) into the left pane.

12: Insert a blank CD into the optical drive and hit the Burn button. Wait a few minutes and there you go! Your unattended Windows XP installation disc is ready!!!