Monday, February 28, 2005

Basecamp and Ruby on Rails.

While surfing, I came across Rails - a framework to write web applications in Ruby.
The first application was Basecamp - a web based project management software.
I applied to Basecamp and created my project site. http://dmahajan.projectpath.com/login/

Ruby is creating a niche for itself. Rails (http://www.rubyonrails.org/) is touted as the framework to launch Ruby.

Another interesting link is Martin Fowler's site on Enterprise Software.
http://martinfowler.com/articles.html

CD Keys, offline registry editing - migrating to the new Windows XP install

The fresh install of Windows XP generated a few interesting questions.
How can you read / change the registry of another Windows instance?
  1. The registry consists of 5 files in c:\winnt\system32\config. (see details here)
  2. Copy these files over to your new instance. (If you have access to the drive, use the recovery console).
  3. To read and manipulate these offline registry files, use regedit to load the 'hive' files. (see details here). You can even fix the offline registry and copy these files back to the original instance.

How can I recover my CD keys for Microsoft products (like Office XP, Visual Studio.NET, Office XP ....)?

There were a couple of programs that I found; RockXP , "Win KeyFinder 1.65" and "Office Keylight 1.00", "CD Key Finder: Magical JellyBean" . I liked RockXP. This thread discusses how these CD keys are stored in the registry.

Some other sites that I encountered along the way

PC Audit: http://www.belarc.com/free_download.html - shows all software and hardware in a nice local HTML page.

Windows IT Pro: http://www.jsifaq.com/

Registry tricks: http://www.mdgx.com/reg.htm

Free 60 day trial key for Office 2003: http://www.microsoft.com/office/trialkey

Creating a slipstream installer: http://www.jsifaq.com/SUBF/Tip2500/rh2529.htm

How to recover from a corrupted registry that prevents Windows XP from starting: http://support.microsoft.com/kb/307545

Sunday, February 27, 2005

Finished the Nephrotic Syndrome site

It feels really nice when you finish a project and sit back to look at the results. I have just finished creating a website for parents with kids who have the Nephrotic Syndrome.
What is the Nephrotic Syndrome?

The site is a ASP.NET based website. It has a DotNetNuke portal and a CommunityServer forums application. Both applications are easy to setup and install. A bit of experience with MS SQL helps though.

To jumpstart the discussion forum, I decided to import messages from an existing discussion site @ siteboard.de. This took some time. I spent two days trying to see if someone had written a utility to import messages. Most hints on the net seemed to point to writing your own code - but I couldn't download the source code for CommunityServer from anywhere.

So I broke the problem into two parts.
1. Scanning the webpage of the old site - and building a list of threads with their messages.
2. Posting these threads and messages into CommunityServer.

Both parts were written in Perl 5.8.
The first part used regular expressions to parse the HTML files and store the appropriate data sections in a array of SB_Message objects.
The second part was simple in the end. There is a stored procedure cs_PostCreateData that creates a new post and updates all the tables. So I can create messages directly from Perl!
The challenges were
1. Learning to use the DBI module in Perl.
2. Parsing the German dates into a HTTP::Date format.

The next challenge was to take this utility and allow it to update the messages ongoing. This would let people continue posting in the old forum, but repost it in the new forum. This required some thinking - finally I decided to use the PropertyValues field to store the old message post code.

Anyway enough said.

Tracing Windows API calls

The program Traceplus (http://www.sstinc.com/products.html) lets you trace all Windows calls and see how they work!

Thursday, February 24, 2005

Spyware infestation

Noticed that I have a Spyware infestation. It started with the installation of 180....
Then I noticed that this program installed a lot of other programs.
McAfee anti-virus scanner does not stop the installation of such spyware. That is SAD.

Time for help.
  1. Download and install Ad-aware. It found 241 objects that it quarantined. Run a deep level scan to check the entire C drive. The definitions file was dated 16-Feb-2005. But it did not detect "Powerscan".
  2. Go to a well known anti-spyware site. I chose the Computer Associates eTrust website to get more information about Powerscan,
I think that the best way is to restore your computer to a stable restore point that was created before the infestation.

Re-installing Windows XP

So I got a new harddisk!
I want to have a "clean" installation of Windows XP, since I've noticed that XP slows down after you install a lot of apps (typically that you never use).

A few learnings.
  1. The "Recovery" XP disks that come with Dell do not have any support packs. It also does not have the drivers for the hardware. In short, it is just a plain vanilla XP installation CD. There is no "recovery" in this CD. What I had expected was that the CD would put the system back to its original factory-shipped state. No luck.
  2. The following link discusses how to make your own custom recovery CDROM. It includes how you can combine SP2 with the installation files so that you don't have to do it seperately. http://www.pcmag.com/article2/0,1759,1750662,00.asp
  3. The next problem is that I don't have the Microsoft CD Keys for Office and XP etc. XP was easy since the Dell had a sticker with the number. For Office - try the programs is program http://www.petri.co.il/quickly_retrieve_windows_cd_key.htm.
    Magical Jelly Bean Keyfinder: http://www.magicaljellybean.com/keyfinder.shtml
    CD Key Reader: http://www.skaro.net/cd-keyreader
  4. I-Tunes - The XML database uses relative paths. So create the same directory structure in the I-Tunes music folder as in the old PC. I used sysinternals.com "Junction" utility to map folders to different drives.
  5. I am still slowly installing the applications that I "really" need. Since I still need to use applications on the "Old Windows", I wanted to find out how to setup "dual-boot" in Windows XP. It is really easy. You start up with the install CD and select recovery mode. Use the commands "fixboot","fixmbr" and "bootcfg". See the installing and using Recovery console link from Microsoft. Bootcfg will regenerate boot.ini which has a list of all operating systems for dual-boot.
    One web resource: http://windows.about.com/cs/dualboot/
    Microsoft notes: Win2000 and WinXP, Multiboot with XP, Installing and using Recovery Console in XP.
  6. You never know which applications are really important!

Web based forums and message boards

I was looking at how could I setup a web discussion forum.
I found that there were two easy choices
  1. Use PHPBB2 (www.phpbb.com) - This is PHP based. I found a site that provides free PHPBB2 forums. www.galacnet.com. PHPBB2 looks really good and easy to setup. Within 30 minutes, I had setup a simple structure (http://phpbb.galacforums.com/Nephrotic_Syndrome/). Using the free server had the issue that half the screen was filled with advertisements. One downside was that it is not easy to install plugins and mods for Phpbb on this server.
  2. Use Community Server::Forums (www.communityserver.org) - This is ASP.NET based. My hosting provider automatically installs this application. It is a nice Forums + BLOGs+ Photo Gallery application. On the plus side - it has built-in RSS feeds for all public forums. However in an anonymous post - it does not let the person type in a name. Slightly annoying because a lot of times, the anonymous user doesn't mind writing the name - just cannot register.

Final decision: Use Community Server::Forums since I can remove all advertisements on that Forum.

Migrating messages is the next challenge. The current message board is run on www.siteboard.de. So I needed a program to download all the messages, while preserving the message - response-reply relationships and dates etc. At this point I've written a short Perl program [download]that can download an entire forum from www.siteboard.de and save it as a Perl Data::Dumper file.