Fixing ZeroCfgSvn.exe crashes

Tags: work || No Comments

I use a Toshiba Satellite M70 which has an Intel ProSet Wireless 2200BG Wireless network card.

I have had a couple of problems with the wireless card though:

  1. When I boot, the wireless connects for about a minute, then the connection drops and it reconnects - this plays havoc on my IM programs not to mention slows my boot time considerably
  2. After I installed VMWare, the Zero Configurations Service kept crashing. This was annoying to say the least.

After a little Googling, it became apparent that the issue is the driver. Easy - go and get the latest driver from Toshiba, right? Wrong - I updated to the lastest version and still no fix.

The solution: Just on to the intel website, select Wireless > Wireless LAN Products menu item on the left and select the wireless card you have.

Download the 123Mb (?!) driver file and install. You will lose your saved Access Point information though.

If you are like me and prefer to have Windows manage you connections, Right-click on the task bar icon and select “Allow Windows to Manage my connections”.

If you are also like me and HATE erronoues taskbar icons, open the Intel Wireless Manager (Start > Programs > Intel PROSet Wireless > Intel PROSet Wireless). Click the Tools > Applications Settings menu and uncheck the “Show application icon in the taskbar” checkbox.

That should do the job quite nicely.

More people to play with

Tags: work || No Comments

Exciting news just to hand! The perth web industry has been going to through a bit of a shake up of late - perpetual freelancers taking full time jobs (That’s me), stalwalts of the industry going out on there own, mergers and aquisitions.

“Mergers and aquisitions”, you say?

“I’ve heard but nothing!”

Yes, dear reader, this little secret has been very well kept (rare for the industry over here) - two major players in the boutique web arena have joined forces in a super-mega-power play of gigantic small business proportions.

Bam creative (my new place of employ) has recently aquired Cube7 (an old client of mine). Customary website here. This is extremely exciting news as both of these companies are well sort after in the local market.

This event is being simul-blogged by Miles Burke and Simon Wright.

Repairing the Windows registry using Knoppix

Oh, what a fun Sunday morning I had. I wake up, chill out and go make myself some breakfast. At around 11, I decide to go and check my email. Turn on the laptop - Blue screen of death. Huh? Something about Windows not being able to load the SOFTWARE hive because it doesn’t exist or is corrupt. Oh crap.

OK. No need to panic. I try booting in Safe Mode. No sugar - same BSOD. Not good.  After a quick google, I find http://www.kellys-korner-xp.com/xp_sys32.htm which tells me that I can restore my SYSTEM and SOFTWARE hive to a clean state by booting into the recovery console. For those playing at home, there are a number of files located in the system32/config directory of your windows install that hold some fairly critical tid-bits of information, such as application settings and such. Without them, your computer doesn’t know what is installed, or how they should run.

Now we are getting somewhere, I think. So I boot into the recovery console. It is at this point that I realise that I don’t know my administrator password. It is also at this point that I realise that I cannot go any further without knowing my administrator password.

Some more googling and I find a number of applications that claim to be able to reset windows passwords from a bootable CD. I download a couple, but find them less than helpful - It would have been more productive for me to throw nerf balls at a number of post-it notes with letters on them, and entered the resulting characters in a megre attempt at a brute force attack.

It is at this point that I realise I should do something I should have done in the first place - I dropped my trusty Knoppix CD into the drive. Luckily, Knoppix 4.0 can mount and write to NTFS drives, so I could complete the steps in the above tutorial. This is what I did:

  1. ntfsmount /mnt/hda1 -o dev=/dev/hda1,umask=0007,force

This mounts the windows drive to the /mnt/hda1 directory in full read/write mode. I needed to add the force option because I has rebooted XP incompletely and the Filesystem was complaining that I needed to run chkdsk.

Next I copied the /mnt/hda1/WINDOWS/repair/software to /mnt/hda1/WINDOWS/system32/config/software

After rebooting, and waiting the 30 minutes it takes for chkdsk to check everything, Windows was booting! Woohoo! Oh. not quite. All of my user settings were gone. And on closer inspection so where all of my program settings, and hardware settings - in fact Windows was denying all knowledge of any of my software. Whilst choking back tears (I really didn’t have time this week to re-install everything all over - I only did it a month ago) I tried to do a System Restore. Guess what? The registry clean out had hosed them as well. (A big thanks to Microsoft for putting this information in the registry, which is what you are trying to restore…)

Not to be deterred, I figured that the System Restore info would still have to be there somewhere, after all, it is saved as files in a hidden directory right? After a quick Google, I found out that my hypothesis was indeed correct via http://wiki.djlizard.net/SVI.

Booting back into Knoppix and mounting the drive again, I went into the System Volume Information directory. I had two  _restore{insert_stupid_amount_of_characters_here} in there. A quick ls -la gave me the older directory. In I went to a fairly recent RP folder and lo and behold I find the files that I needed. I copied them over (according to the tutorial) and voila! Everything was back up and running! God bless System Restore points. I want to glass the registry though.

Beer Economy

As an active member of the Port80 community, I am more often than not in attendence at the Port 80 monthly meetups at the pub. It is amazing what crazy ideas are hatched at these informal meetups (It’s a great system - a group of like-minded people meetup and and talk shop over a couple of beers).

I was chatting about 88 Miles and SEO and Kay piped up and said that if I could get people to link to it using the term Simple time tracking, it would help my rankings for that particular term. My response (and I don’t know if this says something about me) was:

“Right, I’ll by everyone one who links to it using the term “Simple time tracking” a beer at the next meeting.

Well Nick Cowie was the first to comply with his less than subte approach, which I find mildly amusing.

So I’m putting the call out. If you are in WA or going to be in WA, and you are going to show up at the next meeting (on 2 August 2006) AND you link to http://www.88miles.net in your blog using a title attribute or text of “Simple time tracking”, I’ll buy you a beer.

That’s right. It’s in writing, so I can’t get out of it :P

Update: Improved validation in CakePHP for version 1.x

I recently started a new project in CakePHP and thought it time to use version 1. But it seems the way that the validator code works has changed, so here is the updated code:

The following goes in app_model.php

Updated validator code
  1. function invalidFields ($data = array())
  2. {
  3. if (empty($data)) {
  4. $data = $this->data;
  5. }
  6. if (!$this->beforeValidate()) {
  7. return false;
  8. }
  9. if (!isset($this->validate)) {
  10. return true;
  11. }
  12. if (!empty($data)) {
  13. $data = $data;
  14. } elseif (isset($this->data)) {
  15. $data = $this->data;
  16. }
  17. if (isset($data[$this->name])) {
  18. $data = $data[$this->name];
  19. }
  20. $errors = array();
  21. foreach($this->validate as $field_name => $validators) {
  22. foreach($validators as $validator) {
  23. if (isset($data[$field_name]) && !preg_match($validator[‘expression’], $data[$field_name])) {
  24. $errors[$field_name] = $validator[‘message’];
  25. }
  26. }
  27. }
  28. $this->validationErrors = $errors;
  29. return $errors;
  30. }

The validation helper method (See my previous post) looks like this:

  1. function tagErrorMessages() {
  2. $messages = “”;
  3. if(isset($this->validationErrors)) {
  4. foreach($this->validationErrors as $tag) {
  5. foreach($tag as $element => $message) {
  6. $messages .= sprintf(SHORT_ERROR_MESSAGE, empty($message) ? ‘Error in field: ‘ . $element : $message);
  7. }
  8. }
  9. }
  10. return $messages;
  11. }

« Previous Entries