Archive for 2004

Rooting out the spies.

There is an interesting site that I frequent that is now providing a free tool for combating spyware. SpywareGuide, as a whole, is full of very useful information on spyware, but this tool in particular provides quite a bit of insight into how most spyware applications work.

Most spyware loads itself as a Browser Helper Object (BHO).  This means, that it takes a very useful feature built into Microsoft’s Internet Explorer (and Windows Explorer), and corrupts it into a means of spying on everything you do.  All a spyware application needs to do is set a few key registry settings, and Explorer will load it into memory and give it full access to everything.

The tool I found, is simply a registry file that sets a special “Kill Bit” within the BHO registry settings for each of the known spyware applications.  This Microsoft article explains how the bit works.

Of course the downside to this tool, and all other spyware scanning applications, is that they can’t keep up with the rate at which new spyware applications are appearing.  In order to get around this block, and most spyware scanners, all a spyware writer needs to do is change the CLSID of the spyware component’s COM object. A different CLSID means a different registry setting, allowing it to get past the scanners until the vendors update their lists and distribute them to everyone.  That in mind, it’s easy to see why spyware is one of the biggest threats to personal computing.

Fortunately, there is hope — at least for Windows users. XP SP2 locks down the BHO installation process significantly, making it more difficult for a component to be installed without your knowledge.

Batten down the hatches.

There’s something glorious about working from a home office in pajamas. To accomplish this, though, it’s best to have a wireless network to make sitting up in bed and typing away a truly seamless task.

Once your network is functioning, it’s important to make sure that it’s secure. Here’s a helpful article that explains the basics of wireless networking security.

In fact, this is a relatively hot topic. Our home page now features a relevant news feed to keep you posted.

User defined functions in SQL 2000

One of the more useful features of SQL 2000 is the ability to create a user defined function.  One great thing you can do, is build a table that is returned to the caller.  For example:

CREATE FUNCTION fn_Split (@sText varchar(8000), @sDelim varchar(20) = ‘ ‘)
RETURNS @retArray TABLE (idx smallint Primary Key, value varchar(8000))

Can then be used as part of an IN clause like this:

WHERE somefield IN (SELECT value FROM fn_split( ‘x,y,z,a,b,c’, ‘,’ ))

That’s really useful.  One thing to remember: If you intend to use this function to compare to a field that has a collation defined, then the field returned by this function should use the same collation. Otherwise, you will receive an error about mismatched types.

Contact Us

One of the most important parts of a website, is the place where users go to get additional assistance. Typically, something to the effect of “contact us” can be found on the site’s home page.

But what happens when the provided method of contact fails? One would expect that if an e-mail address is provided, it would be valid! It’s not uncommon to find yourself giving up on a business after their advertised support system fails.

If you post an e-mail address, keep it current and check for e-mail often. It really does make a difference and opens the door for new customers.

Using client-side script libraries in a .net UserControl

Let’s suppose that you’re trying to write a UserControl in ASP.net derived from any existing .net control.  You want this control to output some client-side script for input validation, DHTML manipulation, etc.  However, if there is more than one instance of your control, you probably don’t want more than one copy of the script on the page.  It turns out, that this is quite easy to accomplish with one of a group of functions that the Page object exposes. 

These functions are:

  • RegisterClientScriptBlock: Puts the script block at the top of the page
  • IsClientScriptBlockRegistered: Boolean indicating script is already on page
  • RegisterStartupScript: Puts the script block at the bottom of the page
  • IsStartupScriptRegistered: Boolean indicating startup script is already on page
  • RegisterArrayDeclaration: Writes a single block of client-side script that defines an array
  • RegisterOnSubmitStatement: Creates a single OnSubmit function for the page
  • RegisterHiddenField: Creates a single instance of a shared hidden input field

To write out a single block of code on the page for instance, just write something like the following in the Page_Load event (class is not complete):

Public Class ClockControl

Inherits System.Web.UI.UserControl

Const csScriptKey As String = “ClockControl_ScriptLibrary”

Dim scriptString As String=”

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If (Not Me.Page.IsClientScriptBlockRegistered(csScriptKey))Then

Me.Page.RegisterClientScriptBlock(csScriptKey,scriptString)

End If

End Sub

End class

This will ensure that only one < script src = tag will be written to the page regardless of how many instances of your control are hosted on the page.  You can, of course, use this to control the output of any valid Script/HTML/text/XML/etc.

A good defrag goes a long way.

*chug chug chug chug*

That’s what my computer does when I turn it on. Aside from the fact that it only runs at 850 mHz, there is something I can do to speed things up a little.

It may sound strange, but all it needs is a good defrag. My hard drive gets a workout every day and I’m constantly downloading, installing, deleting, copying and moving files from folder to folder. And with multiple accounts on the machine, these actions are repeated quite often. Over time, this bogs down the machine and the hard drive is working extra hard to find things, to store things, and to keep track of all the files that accumulate.

So… what can I do about it? Defrag! This command, built into the Windows operating system, will consolidate free space and organize fragmented files keeping the computer healthy.

Here’s a great tutorial on what defragmenting is and how to do it.

More on WinXP SP2

A couple of weeks have passed since the release of the Windows XP SP2 update from Microsoft.  Did we wait long enough prior to installation?  Here is a good reference describing some of the problems encountered: http://www.winxpnews.com/index.cfm?id=141

Based on that vantage point, most people are not having significant problems with SP2.  However, there are a few who discovered a few particularly nasty surprises.  For instance:

  1. If you do not have at least 1.5 gigabytes of hard drive space available on the windows drive, then DON’T INSTALL. The installation will fail part-way through, leaving your PC unstable.
  2. If you are using DivX, remove it first. If you don’t, your PC will hang when you do some of the most simple file system tasks.
  3. Roxio Easy CD Creator is incompatible with SP2 (ask Roxio for a fix)
  4. A long list of applications that require setting changes is available.  Here are two links to Microsoft’s documented list: http://support.microsoft.com/default.aspx?kbid=884130&product=windowsxpsp2 and http://support.microsoft.com/default.aspx?kbid=842242

Given that information, there is a need to have some knowledge of IP ports and Windows configuration settings in order to get your applications running again. So, if one of your applications is listed, be careful not to get in over your head.

My recommendation is: Do not to upgrade UNTIL you read the list of applications and understand what you may need to do. Print the list before you install the service pack just in case you lose your Internet connection after the installation.

Additionally, Microsoft posted a page specifically for SP2 support at: http://support.microsoft.com/default.aspx?scid=fh%3BEN-US%3Bwindowsxpsp2

Get to the point.

Writing for the web can be tricky, depending on what you need to communicate to your audience. Above all, try to remember that less is more.

Without skimping on quality and the amount of information, there are ways to display content that won’t intimidate readers who just want the bottom line. Websites should facilitate a way to find information — fast.

Here are some ideas to keep your website content easy to read:

  • Use bullet points to list main ideas
  • Pare down paragraphs to include only what’s necessary
  • Link to references on the Internet rather than retyping or repeating content that already exists
  • Separate large amounts of content into multiple web pages to avoid inches of vertical scrolling

Happy September!

Delaying Windows XP Service Pack

I, for one, prefer not to install a Microsoft Service Pack the moment it’s
released.  Especially one as large and complicated as the soon to be
released XP-SP2. I find it’s best to wait at least one week before
installing any significant update to an application. The goal is to let everyone
else find all the flaws and pitfalls first.  Then after a patch – or
two – is released, the inevitable bugs transferred to your system will be
lessened and/or corrected before it’s too late.

Now for the tricky part. Microsoft is planning on forcing all
users
of Windows XP to install this update the moment it is
released.

Since this update is critical, it’s not a good idea to avoid it entirely.
Instead, follow the instructions below to postpone the
installation.  This will allow for time during which problems will be
solved, and updates to the service pack will be available.

Corporations updating large numbers of clients should reference this link: http://news.swzone.it/link.php?action=i&id=12090

Individuals can follow these simple steps:

  1. Open  Control Panel->System
  2. Switch to the “Automatic Updates” tab
  3. Under this tab you have a couple options:
    – You could disable the entire
    service by unchecking the box at the top (not recommended)
    – Or, change the
    selected radio button below to “Notify me before downloading any updates…”

  4. Select one and click OK

Personally, I keep the service enabled, and select the “Notify me…”
option.  This allows me to be notified and to install all the latest
updates when I’m good and ready.

Stay tuned for notes about the aftermath we encounter resulting from this
update!

Linking around.

An important thing to remember when linking to external resources on your website, is that they should open in a new window. Specifically, you should target “_blank” within the HREF to ensure that the destination loads in a new browser window.

This practice is a good idea for linking to:

  • other websites
  • documents (i.e., Word, PDF)

Advantages include:

  1. your site is not taken over by the new content
  2. your site will remain open when the new windows are closed
  3. mistaken clicks do not result in frustration when trying to return to the source page
  4. surfing on your site can continue while new pages or documents download

Simple, but effective. Try it today!

ResQ Features