Monthly Archive: July 2009

Jul
30

Adding Custom Cities to the HTC Weather App

htcweather

In the summer time I like to follow the weather more than usual, so as to not miss a single day of fun in the sun, as we get it so rarely where I live by the arctic circle. However, my new HTC Touch Diamond 2 did not have my town in the weather application! So I set out to get my small town added in, and eventually succeeded thanks to the forum over at xda-developers.com. So, here’s my recipe which takes into account more possible issues than the forums do.

  1. Download and install ActiveSync, .NET Compact Framework 3.5 Redistributable and CeRegEditor.
  2. Browse your HTC phone using Explorer and copy the file “2330fc3c_manila” from the Windows directory onto your PC. Right-click this file and select properties. Untick the box that says “Read-only”.
  3. Download SQLite Administrator. This program does not require installation.
  4. Open the “2330fc3c_manila” file from step 2 using SQLite Administrator on your PC (make sure you select “Any files” when browsing for it).
  5. Select the “Edit Data” tab and click to select the “Cities” table in the tree on the left.
  6. Pick a city you won’t need and edit the “CityName“, “Country” and “accuweatherCode” to match the city you plan to add. You should also edit the timezone and msid values to match another city in the same country and timezone. To find your correct accuweatherCode and other values, look up your desired city on AccuWeather and see the last part of the URL string in your browser that looks something like this: “EUR|NO|NO007|VADSOE“.
    Tip: If your city name contains special characters you may need to substitute them. Check for a city with the same special character and copy from it. This also applies to the city name in the “accuweatherCode” field, except for that the replacement characters may be different. For instance, The “CityName” field may use “Ã,” to replace “ø” in the HTC interface, while the “accuweatherCode” field uses “OE” or “O” to replace the same character. In the address bar of your browser, these characters may be displayed similarly to “%F8%7C”, but do not let that confuse you.
  7. Close the editor. Right-click the now updated database file and select properties. Tick the box that says “Read-only”. Copy the new file back to your HTC, replacing the existing file.Tip: To accomplish this on my HTC Touch Diamond 2 I had to use TotalCommander for Pocket PC. Install TotalCommander by downloading the CAB file to your HTC and running it. Browse to the Windows directory and scroll down to the “2330fc3c_manila” file. Open the properties and remove the “Read-only” attribute. Copy the new “2330fc3c_manila” file from your computer to any folder on your HTC except the Windows folder. Then copy it in TotalCommander to the Windows folder, replacing the old file.
  8. Almost done! Using CeRegEditor, add the following registry key:
    [HKEY_CURRENT_USER\Software\HTC\Manila]
    “Weather.ServerURLOverride”=”http://weather.not2advanced.com/htcweather/forecastdata.php?ac=XDADevs&locCode=%25ls&version= 1&device=innovation”

    Tip: Do not include the “s. Add a new “String” with the name being the first part before “=” and value being the long URL.

  9. Shut down and start your HTC (aka soft reset) and it should now work when you add your new city (or cities)!
[HKEY_CURRENT_USER\Software\HTC\Manila]
"Weather.ServerURLOverride"="http://weather.not2advanced.com/htcweather/forecastdata.php?ac=XDADevs&locCode=%25ls&version= 1&device=innovation"

Jul
20

How To: Install Windows 7 or Windows 8 From USB

windows se7en logo

It is simple to install Windows 7 or Vista from any USB media as long as you follow this guide. First you need to fulfill the following list of prerequisites, which I have expanded on much more than most guides similar to this one, so that you will be prepared for everything:

  • A USB stick or similar USB storage device (aka” USB Flash Drive”) with a minimum of 3 GB capacity
    (Tip: Some USB drives don’t work well as boot devices on certain systems. If you have issues, try a different flash drive.)
  • Windows 7 (or Vista) source files (from ISO or DVD)
    (Tip: If you have obtained an ISO file, you may extract it using WinRAR.)
  • BIOS Settings and Hardware Checks:
    1. Change the boot priority of USB devices so that they are above any harddisks.
    2. Check the boot order for your hard disks. If your USB connected device shows up here, usually you need to hit “Page Up” (PGUP) to move it all the way to the top.
  • Check that your computer supports booting from USB devices. If not, then you probably can’t boot from your USB media. You would need to run the installation from your DVD-drive or obtain an external DVD-drive or adapter.

(Tip: See your PC manual or a tech savvy friend if you have issues with this step. Normally you need to press either F2, F3, F5 or F12 to access the boot menu. Sometimes it helps to press ESC to see what you need to press if neither of those are working.)

Now let’s make a bootable USB device!

But first…

  • You need to obtain the correct version of BOOTSECT.EXE (64-bit/x64 or 32-bit/x86)
    If you’re making the USB bootable media for a 64-bit version of Windows on a 32-bit version of Windows, you need to get yourself the 32-bit version of the BOOTSECT.EXE tool used in this guide, as the 64-bit version found included in the 64-bit source files won’t run on a 32-bit OS. You should be able to get this from any 32-bit install source for Windows 7 or Vista. I cannot put it on my blog, because it is prohibited by the Microsoft EULA.
  1. Plug in your USB stick and backup any important files that you may want to keep.
  2. Open Command Prompt with administrator rights using either of the following methods:
    • Hit the Windows key + R and type CMD. Hit CTRL + SHIFT + ENTER.
    • Type CMD in the Start menu search box. Hit CTRL  + SHIFT + ENTER.
    • Go to Start > All programs > Accessories and right-click on Command Prompt, then select “Run as administrator“.
  3. Type the following commands in the Command Prompt box to find the disk number of your flash disk:
    • DISKPART
    • LIST DISK
  4. Identify your flash disk and note the disk number, then enter the following commands – assuming your USB stick’s disk number is 1:
    • SELECT DISK 1
    • CLEAN
    • CREATE PARTITION PRIMARY
    • SELECT PARTITION 1
    • ACTIVE
    • FORMAT FS=NTFS QUICK
      (QUICK is the switch for Quick Format. Run the command without QUICK if you want all sectors checked. This could take a long time depending on the size and speed of the disk.)
    • ASSIGN
    • EXIT
      (BUT DON’T CLOSE THE COMMAND PROMPT YET!)
  5. Still in Command Prompt? Good, because  you’ll need it again in a few seconds…
  6. If you have an ISO image of Windows 7 or Vista, you may now extract it if you haven’t already, then follow step 6.1. If you have a DVD, follow step 6.2:
    6.1: Assuming you extracted the ISO to C:\Win7, bring up your Command Prompt again, then browse to the BOOT folder by typing: “CD C:\Win7\boot
    6.2: Assuming your DVD drive letter is “D”, bring up Command Prompt and browse to the BOOT folder by typing “D:CD boot”.
  7. Assuming your USB stick drive letter is “E”, type the following command to make the USB stick bootable:
    • BOOTSECT.EXE /NT60 E:
  8. You should see a message saying “Successfully updated NTFS filesystem bootcode. Bootcode was successfully updated on all targeted volumes.”
    If you get an error about x64/x86 incompatibility at this stage, you need to obtain the correct version of BOOTSECT.EXE – see the 4th bulletin at the very top of this guide for more info.
  9. Copy all of your Windows 7 / Vista contents to the USB stick.
  10. Your USB stick is now ready for use! Remember to enable USB boot and change boot priority so that USB-drives are above any harddisks in the boot priority in the BIOS. Refer to your system manual for instructions on how to do this. Also, remember that some USB sticks don’t work as well as others as boot devices, especially with certain older systems that claim to have USB boot capabilities. I can confirm that it worked with a SONY 4GB USB stick on a Dell Latitude E4200 for me, and has worked with many others for people I know. The least reliable kind of USB stick seems to be the variety that come as USB adapters for different memory cards, like SD Card or Memory Stick, BUT they may work even if they don’t appear as USB devices, as they will often simply be listed as harddisks instead.

Jul
03

How To: Remove Windows 7 Watermark

If you’re like me, living on the bleeding edge with Windows 7 RC, you might have noticed the watermark in the right-hand corner of your desktop. Such things annoy me a bit, so I went to work (Googled) how to remove it, and found a great solution.

To remove your watermark(s), download this nifty little watermark removal application, right-click the appropriate file for your system (32-bit or 64-bit) and run it as an administrator. Follow the on-screen instructions and you’re set!

This removes watermarks for all Windows versions and all languages by searching for some standard watermarking strings and modifying the user32.dll.mui file instead of replacing it with a pre-patched file like others do.

Ignore any weird question marks that might be displayed in the CMD window – it still works perfectly.

windows-7-beta-1-watermark-on-desktop

This is a watermark. Watermarks are baaad!