Tuesday, September 27, 2005

Transferring Windows XP Activation Information

  1. Double-click My Computer
  2. Double-click on the "C" drive
  3. Go to the C:\Windows\System32 folder (you may have to click on the link that says "Show The contents of this folder")
  4. Find the files "wpa.dbl" and "wpa.bak" and copy them to a safe location. You can copy them on a floppy drive or burn it onto a CD or DVD.
  5. After you have reinstalled Windows XP on your reformatted hard drive, click "No" when asked if you want to go ahead and go through the activation process
  6. Reboot your computer into SafeMode (you can either press F8 as Windows is booting up to see the Windows Advanced Options menu and select SAFEBOOT_OPTION=Minimal or follow the instructions in Starting Windows XP in SafeMode
  7. Double-click My Computer
  8. Double-click on the "C" drive
  9. Go to the C:\Windows\System32 folder (you may have to click on the link that says "Show The contents of this folder")
  10. Find the file "wpa.dbl" and "wpa.bak" (if it exists) and rename them to "wpadbl.new" and "wpabak.new"
  11. Copy your original "wpa.dbl" and "wpa.bak" files from your floppy disk, CD or DVD into the C:\Windows\System32 folder
  12. Restart your system (if you followed the directions in Starting Windows XP in SafeMode you may need to go back into MSCONFIG to turn off booting into SafeMode)

Wednesday, September 21, 2005

Slipstreaming Windows XP with Service Pack 2

Slipstreaming Windows XP with Service Pack 2 (SP2)

Step 1: Copy your XP CD-ROM contents to the hard drive

First, you need to find your Windows XP CD-ROM (any bootable and/or retail version; including Full and Upgrade versions; XP Home or Pro "gold" release) and copy the contents of the CD to your hard drive. Create a folder in the root of your C: drive called xp (C:\xp) and use My Computer to simply drag and drop the files between the two locations.


Step 2: Get XP SP2

While this is copying, obtain the Full Network Install version of Windows XP Service Pack 2 (272 MB), which you can download from the Microsoft Web site or copy from the Windows XP SP2 CD-ROM. The download version of this file is named WindowsXP-KB835935-SP2-ENU.exe, while the CD version is called xpsp2.exe. However, both are identical, save for the name. For this reason, I will refer to the simpler xpsp2.exe below, but you can substitute WindowsXP-KB835935-SP2-ENU.exe for that (You can also rename WindowsXP-KB835935-SP2-ENU.exe to xpsp2.exe if you'd like). Now, create a new folder called sp2 on the C drive (C:\sp2) and then copy this file to that location.

Step 3: Combine XP with SP2

Now, you need to bring up a command line window by navigating to Start, and then Run, and typing "cmd" (no quotes); then hit ENTER. In the command line window, type the following (where [ENTER] means hit the ENTER key):

cd \ [ENTER]
cd sp2 [ENTER]
xpsp2.exe /integrate:c:\xp [ENTER]

First, an Extract dialog box will come up and extract the files contained within xpsp2.exe. Then, XP SP2 Setup will combine, or slipstream, the SP2 files into the XP install, as shown in this figure:

3

When it's completed, you'll see this dialog box. Click OK, and then close the command line window. If you don't see this dialog, you've done something wrong. Ensure that the command line entries you've used are correct.

Step 4: Extract a file needed to make your new CD bootable

Before we simply burn the resulting file set to a CD, we need to make sure we have a hidden file found on your XP CD-ROM that will make your new CD bootable. We can't grab this file with My Computer, but will instead use a shareware tool called ISOBuster, which you can find on the Smart Projects Web site. The latest version at the time of this writing is 1.6.

After you download and install ISOBuster, choose to use only the product's free functionality, unless you decide to purchase it, which wouldn't be a bad idea. The ISOBuster UI will resemble the following (assuming you've left your XP CD in the CD-ROM drive):

On the left-side tree view, make sure you have selected the node named Bootable CD. You should see a file called Microsoft Corporation.img (or similar; it will be named something.img) in the right side of ISOBuster. This is the file you need to extract. To do so, right-click and choose Extract Microsoft Corporation.img. When ISOBuster prompts you, choose to download it to the root of your C: drive. Now you can close ISOBuster.

Step 5: Make a bootable XP SP2 CD

Start My Computer and make a note of the name of your Windows XP CD (my CD happens to be named WXPVOL_EN because it's a volume licensed version of XP Pro, but yours will likely be different). Then, eject the XP CD and place a burnable CD (CD-R or CD-RW) in your CD burner, and dismiss any autorun dialog boxes XP might display.

Now, you're ready to burn your new, bootable Windows XP SP2 CD. How you do this will depend on the CD writing software you use. In this section, I'll examine Nero Burning ROM 6 and versions 5 and 6 of Roxio Easy CD/Media Creator. Please note, however, that the latest version of Easy Media Creator, version 7, will not work. I'm looking into workarounds.

Click here for Nero Burning ROM 6 instructions
Click here for Easy CD Creator 5.x instructions
Click here for Easy CD Creator 6.x instructions (coming soon)

Step 5a: Make a bootable XP SP2 CD with Nero Burning ROM 6

First, start Nero Burning ROM and choose CD-ROM (Boot) from the New Compilation's Boot page. Then, under "Source of boot image data," choose "Image file" and select C:\Microsoft Corporation.img by clicking the Browse button. Then, select the option titled "Enable expert settings (for advanced users only)" and change "Kind of emulation" to No Emulation, and change "Number of loaded sectors" to 4. The "Load segment of sectors" option should remain at its default value of 07C0. When this step is completed, the Nero Burning ROM application should resemble the following:

Now, select the Label page in Nero Burning ROM. Under "Volume label, ISO 9660" enter the name of your CD (WXPVOL_EN in my case). When completed, this page of the dialog should resemble the following:

Now, click the New button. The New Compilation dialog disappears and the main window of Nero Burning ROM is available, as shown here.

On the right side of the application, in the File Browser area, navigate to C:\xp. Then, select all of the files inside of that directory and copy them over to the new CD, as shown here:

Now you're ready to burn the CD. Click the Burn icon in the toolbar, or choose Recorder and then Burn Compilation, and then click the Burn button. Nero will cache the files and then write them to disc, as shown here:

Now, jump down to Step 6...

Step 5b: Make a bootable XP SP2 CD with Roxio Easy Media Creator 5.x

Start Easy CD Creator and choose File, then New Project, and then Bootable CD. This will launch the Choose Type of Bootable CD dialog, shown below. In this dialog, select "No Emulation" for Bootable CD Type, 0x7c0 as the Load Segment (this is the default choice), and 4 for the Sector Count. Then, click the Browse button to locate the Microsoft Corporation.img file and use this as the bootable image. Click OK to close the dialog.

When the dialog closes, you're returned to the main Easy CD Creator window, which now shows two files, BOOTCAT.BIN and BOOTIMG.BIN, in the root of the CD project you're making. Select File and then CD Project Properties to launch the CD Project Properties dialog. There are three tabs in this dialog, and they should be configured to resemble the following three shots.



A couple of notes here: The Volume Label should match the name of your original XP CD-ROM. In the figure above, it's named WXPFPP_EN, which is the name of the retail Windows XP Professional (US) CD-ROM, but yours could be different. Make sure the options in each tab on your system match the options as shown in figures above, then click OK to close the dialog.

Now, drag and drop all of the files from C:\xp to the CD project. You can do this from within the Easy CD Creator interface, or you can open a My Computer window and drag them over from there if you'd like. When you're done, the Easy CD Creator window should resemble the following.

Now, click the red Record button to start burning the CD. The Record CD Setup dialog appears. Click Start Recording to begin. While your CD is created, the Record CD Progress dialog will appear, as shown below. When its done, click OK to close the dialog.

Now, jump down to Step 6...

Step 5c: Make a bootable XP SP2 CD with Roxio Easy CD & DVD Creator 6.x

Start Creator Classic and choose File, then New Project, and then Bootable CD. This will launch the Choose Type of Bootable CD dialog. Click the Advanced button and the dialog will resemble the figure shown below. In this dialog, select "No Emulation" for Bootable Disc Type, 0x7c0 as the Load Segment (this is the default choice), and 4 for the Sector Count. Then, click the Browse button to locate the Microsoft Corporation.img file and use this as the bootable image. Click OK to close the dialog.

When the dialog closes, you're returned to the main Creator Classic window, which now shows two files, BOOTCAT.BIN and Microsoft Corporation.img, in the root of the CD project you're making. Rename Microsoft Corporation.img to BOOTIMG.BIN.

Now, select File and then CD Project Properties to launch the CD Project Properties dialog. There are three tabs in this dialog, and they should be configured to resemble the following three shots.



A couple of notes here: The Volume Label in the first tab should match the name of your original XP CD-ROM. In the figure above, it's named WXPFPP_EN, which is the name of the retail Windows XP Professional (US) CD-ROM, but yours could be different. Make sure the options in each tab on your system match the options as shown in figures above, then click OK to close the dialog.

Now, drag and drop all of the files from C:\xp to the CD project. You can do this from within the Creator Classic interface, or you can open a My Computer window and drag them over from there if you'd like. During the copy process, you will receive approximately three error dialogs noting that certain directory names (such as SYMBOLS.PRI) will need to be renamed to be compatible with the naming conventions of your disc file system. The first time you see this dialog, simply click "Change All" to dismiss it.

Once you're done copying the files, the Creator Classic window will resemble the following.

Now, click the orange Record button to start burning the CD. The Record Setup dialog appears. Click OK to start recording the CD. While your CD is created, the Burn Disc Progress dialog will appear, as shown below. When its done, click OK to close the dialog.

Step 6: Test it

Once the CD is created, you should test it on a non-critical system or in a virtual machine such as those used by Microsoft Virtual PC and VMWare Workstation. Depending on the environment you choose, the CD should either boot automatically, or you will see a note asking you to press any key to install. Use the CD to install Windows XP with SP2 to make sure it's working correctly. Most important, perhaps, ensure that the version of XP you've installed is SP2. To do so, go to Start, then Run, and type "winver" (no quotes) and hit ENTER. The SP2 version number is 5.1 (Build 2600.xpsp_sp2_rtm.040803-2158: Service Pack 2).

When you're done testing, you should consider backing up the newly created CD, and deleting the cruft you've added to your hard drive, specifically C:\Microsoft Corporation.img, and the directories C:\xp and C:\sp2.

This note was copied from http://www.winsupersite.com/showcase/windowsxp_sp2_slipstream.asp

Tuesday, September 20, 2005

Changing MAC addresses

  • Linux

Under Linux, the MAC address of a Network Interface Card (NIC) can be changed by doing the following: (You must be root in order for this to work)

/etc/init.d/networking stop
ifconfig eth0 hw ether 00:01:02:03:04:08
/etc/init.d/networking start

That's all there is to it.

In Redhat and other similar systems (Fedora, etc) an easy way to make it "permanent" across reboots is to just add a variable like this to your ifcfg-eth0 or similar file:

MACADDR=12:34:56:78:90:ab

(upper or lower case on the MAC address are fine, because the network function does a "toupper" on it)

and service network restart for prompt results.

  • Mac OS X

Under Mac OS X, the MAC address can be altered in a fashion similar to the Linux and FreeBSD methods:

sudo ifconfig en0 lladdr 00:01:02:03:04:05

or

sudo ifconfig en0 ether 00:01:02:03:04:05

This must be done as the superuser

  • Windows

Under Windows XP, the MAC address can be changed in the Ethernet adapter's Properties menu, in the Advanced tab, as "MAC Address", "Locally Administered Address", "Ethernet Address" or "Network Address". The exact name depends on the Ethernet driver used; not all drivers support changing the MAC address in this way.

However, a better solution - requiring Administrative User Rights - is to pass over the System Registry Keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}. Here settings for each network interface can be found. The contents of the string value called 'NetworkAddress' will be used to set the MAC address of the adapter when next it is enabled. Resetting the adapter can be accomplished in script with the freely available command line utility 'devcon' from Microsoft, or from the adapters context menu in the Network Connections control panel applet.

Yet another solution is to type ipconfig /all in a command prompt while connected to the network. The MAC address appears next to "Physical Address".

Changing the MAC address in W2K and XP

(this page stolen from http://www.klcconsulting.net/change_mac_w2k.htm because I wanted a copy in my notes here so I wouldn't lose it)

Method 1:

This is depending on the type of Network Interface Card (NIC) you have. If you have a card that doesn’t support Clone MAC address, then you have to go to second method.

    1. Go to Start->Settings->Control Panel and double click on Network and Dial-up Connections.

    2. Right click on the NIC you want to change the MAC address and click on properties.

    3. Under “General” tab, click on the “Configure” button

    4. Click on “Advanced” tab

    5. Under “Property section”, you should see an item called “Network Address” or "Locally Administered Address", click on it.

    6. On the right side, under “Value”, type in the New MAC address you want to assign to your NIC. Usually this value is entered without the “-“ between the MAC address numbers.

    7. Goto command prompt and type in “ipconfig /all” or “net config rdr” to verify the changes. If the changes are not materialized, then use the second method.

    8. If successful, reboot your systems.

Method 2:

This method requires some knowledge on the Windows Registry. If you are not familiar with Windows Registry, just use the SMAC tool to change the MAC addresses, or consult with a technical person before you attempt on the following steps. Also, make sure you have a good backup of your registry.

a. Goto command prompt and type “ipconfig /all”, and

I. Record the Description for the NIC you want to change.

II. Record the Physical Address for the NIC you want to change. Physical Address is the MAC Address


figure 1.

b. Goto command prompt and type “net config rdr”, and you should see something like


figure 2.

c. Remember the number between the long number (GUID) inside the { }. For example, in the above “net config rdr” output, for MAC address “00C095ECB793,” you should remember {1C9324AD-ADB7-4920-B02D-AB281838637A}. You can copy and paste it to the Notepad, that’s probably the easiest way. (See figure 2.)

d. Go to Start -> Run, type “regedt32” to start registry editor. Do not use “Regedit.”

e. Do a BACKUP of your registry in case you screw up the following steps. To do this

I. Click on “HKEY_LOCAL_MACHINE on Local Machine” sub-window

II. Click on the root key “HKEY_LOCAL_MACHINE”.

III. Click on the drop-down menu “Registry -> Save Subtree As” and save the backup registry in to a file. Keep this file in a safe place.

f. Go to “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}. Double click on it to expand the tree. The subkeys are 4-digit numbers, which represent particular network adapters. You should see it starts with 0000, then 0001, 0002, 0003 and so on. (See figure 3.)


Figure 3.

g. Go through each subkey that starts with 0000. Click on 0000, check DriverDesc keyword on the right to see if that's the NIC you want to change the MAC address. The DriveDesc should match the Description you recorded from step (a.-I.). If you are not 100% sure about the DriverDesc, then you can verify by checking if the NetCfgInstanceID keyword value matches the GUID from step (c).
If there is no match, then move on to 0001, 0002, 0003, and so on, until you find the one you want. Usually 0000 contains the first NIC you installed on the computer.
In this demonstration, 0000 is the NIC I selected. (See figure 3.)

h. Once you selected the subkey (i.e. 0000), check if there is a keyword "NetworkAddress" exist in the right side of the window. (See figure 3.)

I. If "NetworkAddress" keyword does not exist, then create this new keyword:

i. Click on the drop down menu “Edit -> Add Value”.

ii. In the Add Value window, enter the following value then click OK. (See figure 4.)
Value Name: = NetworkAddress
Data Type: = REG_SZ


Figure 4.

iii. String Editor window will pop up at this time (see figure 5.)

iv. Enter the new MAC address you want to modify. Then click OK.
(There should not be any "-" in this address. Your entry should only consist of 12 digits as seen in the figure 5.)

II. If "NetworkAddress" keyword exists, make sure it shows the keyword type is REG_SZ, and it should show as NetworkAddress:REG_SZ: . This keyword might not have a value at this time.

i. Double click on the keyword NetworkAddress and the String Editor window will pop up. (See Figure 5.)

ii. Enter the new MAC address you want to modify. Then click OK.
(There should not be any "-" in this address. Your entry should only consist of 12 digits as seen in the figure 5.)


Figure 5.

j. There are 2 ways to make the new MAC address active. Method I does not require a system reboot:

I. Goto Start->Setting->Control Panel, and double click on "Network Neighborhood".
WARNING: Make sure you understand that you WILL lose the network connection after completing step "ii." below, and
if you have a DHCP client, you will get a new IP address after completing step "iii."

i. Select the Network Adaptor you just changed the MAC address.

ii. Right click on the selected Network Adaptor and click "Disable."
Verify the status column for this adaptor changes to "Disabled"

iii. Right click on the selected Network Adaptor and click "Enable."
Verify the status column for this adaptor changes to "Enabled"

iv. If for any reason it cannot be disabled or re-enabled, you have to
reboot your system to make the changes effective.

II. Reboot your Windows system.

k. Once completing step j (if rebooting the system, wait until the reboot is completed), go to command prompt, type “ipconfig /all” to confirm the new MAC address.

Restore The TRUE Hardware burned-in MAC Address:

  1. Remove the entry you added:

  1. If you followed Method 1, then go back to the advanced properties window and remove the entry you add.

  2. If you followed Method 2, then remove the "NetworkAddress" keyword you added in the registry.

  1. Use step (j) above to activate the change you make.

  2. Once rebooted, go to command prompt, type “ipconfig /all” to confirm the original MAC address.

If MAC Address changes does not work:

If for whatever reason the MAC address cannot be changed using method 2, make sure you restore the registry setting by following the "Restore The TRUE Hardware burned-in MAC Address" instruction above. If necessary, restore the registry you just backed-up to get your system back to the original state. You can do this by clicking on the drop-down menu “Registry->Restore,” and restore your backup registry file.

Wednesday, September 14, 2005

Re-enable DMA using the Registry Editor

Run REGEDIT. Go to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}

It has subkeys like 0000, 0001, 0002, etc. Normally 0001 is the primary IDE channel, 0002 the secondary, but other numbers can occur under certain circumstances. You have to go through these subkeys and check the DriverDesc value until you find the proper IDE channel.

Delete MasterIdDataChecksum or SlaveIdDataChecksum, depending on whether the device in question is attached as master or slave, but it can't actually hurt to delete both. Reboot. The drive DMA capabilities will be redetected.

Open Device Manager again and check whether the device is now actually using DMA mode. If so, congratulations, you've made it (at least until the next time Windows disables DMA).

Tuesday, September 13, 2005

X-CD-Roast

X-CD-Roast tries to be the most flexible CD-burning software ever. It allows even the unexperienced user to create or copy a CD with a few mouse clicks in a intuitive and nice looking graphical user interface.

Thursday, September 01, 2005

DWR - Direct Web Remoting

AJAX is an approach to writing web pages that improves a web site's appeal and usability. It enhances user interaction by targeting updates from the server to specific areas of the web page. It allows information to be changed without long delays or frustrating page refreshes.

DWR reduces development time and the likelihood of errors by providing commonly used functions and removing almost all of the repetitive code normally associated with highly interactive web sites.

DWR is freely available as open source software (ASL version 2.0). It is straightforward to implement with extensive libraries, examples and tutorials. Incorporating it into existing sites is simple as it readily integrates with the most commonly used Java frameworks.